# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
499417 | 2021-12-28T11:30:28 Z | Rande | Ljeto (COCI21_ljeto) | C++14 | 1 ms | 204 KB |
#include<bits/stdc++.h> using namespace std; int main(){ int n; cin>>n; int c1=0; int c2=0; int tt,aa,bb; int i,ii; int r,rr; cin>>tt>>aa>>bb; if(aa<=4){ c1+=100; i=tt; r=aa; } else if(aa>=5){ c2+=100; ii=tt; rr=aa; } for(int j=1;j<n;j++){ int t,a,b; cin>>t>>a>>b; if(a<=4){ if(abs(i-t)<=10&&a==r){ c1+=150; i=t; } else if(a!=r){ c1+=100; i=t; } r=a; } else if(a>=5){ if(abs(ii-t)<=10&&a==rr){ c2+=150; ii=t; } else if(a!=rr){ c2+=100; ii=t; rr=a; } } } cout<<c1<<" " <<c2<<endl; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 204 KB | Output is correct |
2 | Incorrect | 0 ms | 204 KB | Output isn't correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 204 KB | Output is correct |
2 | Correct | 0 ms | 204 KB | Output is correct |
3 | Incorrect | 0 ms | 204 KB | Output isn't correct |
4 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 204 KB | Output is correct |
2 | Incorrect | 0 ms | 204 KB | Output isn't correct |