Submission #639725

#TimeUsernameProblemLanguageResultExecution timeMemory
639725tabrHoliday (IOI14_holiday)C++17
Compilation error
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

Compilation message (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 | }
      | ^