제출 #372619

#제출 시각아이디문제언어결과실행 시간메모리
372619blueGrowing Vegetables is Fun 4 (JOI21_ho_t1)C++11
컴파일 에러
0 ms0 KiB
#include <iostream> using namespace std; int main() { int N; cin >> N; long long A[N+1]; for(int i = 1; i <= N; i++) cin >> A[i]; long long res = 4'000'000'000'000'000'000; long long inc[N+1], dec[N+1]; inc[1] = 0; dec[N] = 0; for(int i = 2; i <= N; i++) inc[i] = inc[i-1] + max((A[i-1] + 1) - A[i], 0LL); for(int i = N-1; i >= 1; i--) dec[i] = dec[i+1] + max((A[i+1] + 1) - A[i], 0LL); for(int i = 1; i <= N; i++) res = min(res, max(inc[i], dec[i])); cout << res << '\n'; }

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

Main.cpp:12:22: warning: multi-character character constant [-Wmultichar]
   12 |     long long res = 4'000'000'000'000'000'000;
      |                      ^~~~~
Main.cpp:12:30: warning: multi-character character constant [-Wmultichar]
   12 |     long long res = 4'000'000'000'000'000'000;
      |                              ^~~~~
Main.cpp:12:38: warning: multi-character character constant [-Wmultichar]
   12 |     long long res = 4'000'000'000'000'000'000;
      |                                      ^~~~~
Main.cpp: In function 'int main()':
Main.cpp:12:22: error: expected ',' or ';' before '\x303030'
   12 |     long long res = 4'000'000'000'000'000'000;
      |                      ^~~~~