제출 #1255042

#제출 시각아이디문제언어결과실행 시간메모리
1255042tosivanmak이주 (IOI25_migrations)C++20
0 / 100
27 ms492 KiB
#include "migrations.h" #include<bits/stdc++.h> using namespace std; #define ll long long ll dep[10005]; ll maxdep=0; int send_message(int N, int i, int Pi) { dep[i]=dep[Pi]+1; if(dep[i]>maxdep){ maxdep=dep[i]; return 1; } return 0; } std::pair<int, int> longest_path(std::vector<int> S) { for(int i=S.size()-1;i>=0;i--){ if(S[i]==1){ return {0,i+1}; } } }

컴파일 시 표준 에러 (stderr) 메시지

migrations.cpp: In function 'std::pair<int, int> longest_path(std::vector<int>)':
migrations.cpp:22:1: warning: control reaches end of non-void function [-Wreturn-type]
   22 | }
      | ^
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...