Submission #67702

#TimeUsernameProblemLanguageResultExecution timeMemory
67702theknife2001Boxes with souvenirs (IOI15_boxes)C++17
Compilation error
0 ms0 KiB
#include "boxes.h" #include "grader.cpp" #include <bits/stdc++.h> using namespace std; const int N=1e6+55; bool vis[N]; int n; long long delivery(int N, int k, int L, int p[]) { n=N; int x; int temp=0; bool q=0; long long ans=0; for(int i=0;i<n;i++) { x=k; temp=0; while(x--&&i<n) { if(p[i]==0) { vis[i]=1; i++; x++; } if(p[i]-temp<=L-(p[i]-temp)) { temp=p[i]; vis[i]=1; i++; } else break; } ans+=temp+min(temp,L-temp); } for(int i=n-1;i>=0&&vis[i]==0;i--) { x=k; temp=0; if(vis[i]) break; while(x--&&!vis[i]&&i<n) { temp=p[i]; i--; } ans+=L-temp+min(temp,L-temp); } return ans; }

Compilation message (stderr)

boxes.cpp:2:10: fatal error: grader.cpp: No such file or directory
 #include "grader.cpp"
          ^~~~~~~~~~~~
compilation terminated.