# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1100489 | 2024-10-14T05:34:49 Z | rayan_bd | Ljeto (COCI21_ljeto) | C++17 | 1 ms | 508 KB |
#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
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 340 KB | Output is correct |
2 | Correct | 1 ms | 340 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 340 KB | Output is correct |
2 | Correct | 1 ms | 340 KB | Output is correct |
3 | Correct | 1 ms | 340 KB | Output is correct |
4 | Correct | 1 ms | 460 KB | Output is correct |
5 | Correct | 1 ms | 508 KB | Output is correct |
6 | Correct | 1 ms | 340 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 340 KB | Output is correct |
2 | Correct | 1 ms | 340 KB | Output is correct |
3 | Correct | 1 ms | 340 KB | Output is correct |
4 | Correct | 1 ms | 340 KB | Output is correct |
5 | Correct | 1 ms | 340 KB | Output is correct |
6 | Correct | 1 ms | 460 KB | Output is correct |
7 | Correct | 1 ms | 508 KB | Output is correct |
8 | Correct | 1 ms | 340 KB | Output is correct |
9 | Correct | 1 ms | 340 KB | Output is correct |
10 | Correct | 1 ms | 340 KB | Output is correct |
11 | Correct | 1 ms | 340 KB | Output is correct |
12 | Correct | 1 ms | 340 KB | Output is correct |
13 | Correct | 1 ms | 340 KB | Output is correct |