제출 #283498

#제출 시각아이디문제언어결과실행 시간메모리
283498FlashGamezzz선물상자 (IOI15_boxes)C++14
컴파일 에러
0 ms0 KiB
#include "boxes.h" long long delivery(int N, int K, int L, int p[]) { long n = N, k = K, l = L; long teams[10000002]; teams[0] = 0; for (long i = 1; i <= n; i++){ teams[i] = p[i]; } teams[n+1] = l; long long ans = 1000000000000000000; for (long i = 0; i <= n; i++){ long long t = 0; long j = i, count = 0; while (j >= 0){ if (count == 0){ t += 2*teams[j]; count = k; } j--; count--; } j = i+1; count = 0; while (j <= n){ if (count == 0){ t += 2*(l-teams[j]); count = k; } j++; count--; } ans = min(ans, t); } return ans; }

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

boxes.cpp: In function 'long long int delivery(int, int, int, int*)':
boxes.cpp:33:9: error: 'min' was not declared in this scope
   33 |   ans = min(ans, t);
      |         ^~~