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(){
ios::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
int pirmi = 0;
int antri = 0;
int kiek; cin >> kiek;
int kada[9] = {0};
while(kiek--){
int laikas,a,b; cin >> laikas >> a >> b;
if(a>=1 and a<=4){
pirmi += 100;
if(laikas-kada[a]<=10 and kada[a]!=0){
pirmi += 50;
}
kada[a] = laikas;
} else{
antri += 100;
if(laikas-kada[a]<=10 and kada[a]!=0){
antri += 50;
}
kada[a] = laikas;
}
}
cout << pirmi << " " << antri;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |