제출 #639725

#제출 시각아이디문제언어결과실행 시간메모리
639725tabr휴가 (IOI14_holiday)C++17
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h> using namespace std; #ifdef tabr #include "library/debug.cpp" #else #define debug(...) #endif // editorial long long findMaxAttraction(int n, int s, int d, int a[]) { function<void(int, int, int, int)> DnC = [&](int, int, int, int) { }; Dnc(max(0, s - d), s, s, n - 1); reverse(a, a + n); s = n - 1 - s; Dnc(max(0, s - d), s, s, n - 1); } #ifdef tabr int main() { ios::sync_with_stdio(false); cin.tie(0); return 0; } #endif

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

holiday.cpp: In function 'long long int findMaxAttraction(int, int, int, int*)':
holiday.cpp:15:5: error: 'Dnc' was not declared in this scope; did you mean 'DnC'?
   15 |     Dnc(max(0, s - d), s, s, n - 1);
      |     ^~~
      |     DnC
holiday.cpp:19:1: warning: no return statement in function returning non-void [-Wreturn-type]
   19 | }
      | ^