제출 #28916

#제출 시각아이디문제언어결과실행 시간메모리
28916Nikefor쌀 창고 (IOI11_ricehub)C++98
컴파일 에러
0 ms0 KiB
#include "ricehub.h" #include<algoritm> int field[10001]; int besthub(int R, int L, int X[], long long B) { int optimalGain=0; int m, l, r; l = r = m = 0; long long spent = 0; int localGain = 0; while(r<R) { if(r!=(R-1))r++; m = ((r-l)%2)?(r+l+1)/2:(r+l)/2; spent+= X[r]-X[m]; if(spent>B) { optimalGain = max(optimalGain, localGain); while(spent>B) { l++; spent-= X[l]-X[m]; m = ((r-l)%2)?(r+l+1)/2:(r+l)/2; localGain--; } continue; } localGain++; } return optimalGain ; }

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

ricehub.cpp:2:19: fatal error: algoritm: No such file or directory
 #include<algoritm>
                   ^
compilation terminated.