Submission #28862

#TimeUsernameProblemLanguageResultExecution timeMemory
28862NikeforRace (IOI11_race)C++98
9 / 100
38 ms1788 KiB
#include "race.h" #define inf 1<<22 int best_path(int N, int K, int H[][2], int L[]) { int opt= -1; for(int i=0; i<N; i++) { int sum = 0; for(int j=i+1; j<N; j++) { sum+= L[j-1]; if(sum==K) { if( (j-i)<opt or opt==-1 ) opt = j-i; } if(sum>K) break; } } return opt; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...