# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
499417 | Rande | Ljeto (COCI21_ljeto) | C++14 | 1 ms | 204 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#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 (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |