(UPD: 2024-12-04 14:48 UTC) Judge is not working due to Cloudflare incident. (URL) We can do nothing about it, sorry. After the incident is resolved, we will grade all submissions.

Submission #332381

#TimeUsernameProblemLanguageResultExecution timeMemory
332381lumenTraffic (IOI10_traffic)C++17
Compilation error
0 ms0 KiB
#include<bits/stdc++.h> #include<iomanip> #include<cmath> using namespace std; typedef long long int lli; #define PB push_back #define MP make_pair #define FR first #define SR second #define LB lower_bound #define UB upper_bound typedef vector<long long int> vi; typedef pair<long long int,long long int> pi; #define all(a) (a).begin(),(a).end() #define allr(a) (a).rbegin(),(a).rend() #define FOR(i,a,b) for(int i=a;i<b;i++) int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); lli N; cin>>N; vi P(N+1); vi S(N+1),D(N+1); FOR(i,1,N+1) { cin>>P[i]; } FOR(i,1,N) { cin>>S[i]; } FOR(i,1,N) { cin>>D[i]; } vi pre(N+1,0); FOR(i,1,N+1) { pre[i]=pre[i-1]+P[i]; } lli ans=INT_MAX; lli index; FOR(j,1,N+1) { lli point1=max(pre[j-1],pre[N]-pre[j]); if(ans>point1) { ans=point1; index=j-1; } } cout<<index; }

Compilation message (stderr)

/tmp/ccz3Vnyu.o: In function `main':
grader.cpp:(.text.startup+0x0): multiple definition of `main'
/tmp/ccASvG5g.o:traffic.cpp:(.text.startup+0x0): first defined here
/tmp/ccz3Vnyu.o: In function `main':
grader.cpp:(.text.startup+0xd9): undefined reference to `LocateCentre(int, int*, int*, int*)'
collect2: error: ld returned 1 exit status