# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1100489 | rayan_bd | Ljeto (COCI21_ljeto) | C++17 | 1 ms | 508 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() {
ios_base::sync_with_stdio(0);
cin.tie(0); cout.tie(0);
int n,t,a,b;cin>>n;
vector<vector<int>> player(10);
for(int i=0;i<n;++i){
cin>>t>>a>>b;
player[a].push_back(t);
}
for(int i=1;i<=8;++i){
sort(player[i].begin(),player[i].end());
}
int t1=0,t2=0;
for(int i=1;i<=4;++i){
if(player[i].size()>0)t1+=100;
for(int j=1;j<player[i].size();++j){
t1+=100;
if((player[i][j]-player[i][j-1])<=10) t1+=50;
}
}
for(int i=5;i<=8;++i){
if(player[i].size()>0)t2+=100;
for(int j=1;j<player[i].size();++j){
t2+=100;
if((player[i][j]-player[i][j-1])<=10) t2+=50;
}
}
cout<<t1<<" "<<t2<<'\n';
return 0;
}
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... |