# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
796643 | 2023-07-28T15:10:52 Z | Tunglam07 | Ljeto (COCI21_ljeto) | C++17 | 1 ms | 316 KB |
#include <bits/stdc++.h> using namespace std; int main() { ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); int t, cnt[9],time,p1,p2,sc1=0,sc2=0, tbonus[9]; for(int i=1;i<=9;i++) { tbonus[i] = INT_MAX; } for(int i=1;i<=9;i++) { cnt[i]=0; } cin >> t; for(int i=1;i<=t;i++) { cin >> time >> p1 >> p2; cnt[p1]++; if(p1>=1&&p1<=4) { sc1+=100; if(cnt[p1]>1&&i!=1) { if((time-tbonus[p1])<=10) { sc1+=50; } } } else { sc2+=100; if(cnt[p1]>1&&i!=1) { if(abs(time-tbonus[p1])<=10) { sc2+=50; } } } tbonus[p1]=time; } cout << sc1 << " " << sc2; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 212 KB | Output is correct |
2 | Correct | 1 ms | 212 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 212 KB | Output is correct |
2 | Correct | 1 ms | 212 KB | Output is correct |
3 | Correct | 1 ms | 212 KB | Output is correct |
4 | Correct | 1 ms | 316 KB | Output is correct |
5 | Correct | 1 ms | 212 KB | Output is correct |
6 | Correct | 1 ms | 212 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 212 KB | Output is correct |
2 | Correct | 1 ms | 212 KB | Output is correct |
3 | Correct | 1 ms | 212 KB | Output is correct |
4 | Correct | 1 ms | 212 KB | Output is correct |
5 | Correct | 1 ms | 212 KB | Output is correct |
6 | Correct | 1 ms | 316 KB | Output is correct |
7 | Correct | 1 ms | 212 KB | Output is correct |
8 | Correct | 1 ms | 212 KB | Output is correct |
9 | Correct | 0 ms | 212 KB | Output is correct |
10 | Correct | 0 ms | 212 KB | Output is correct |
11 | Correct | 1 ms | 312 KB | Output is correct |
12 | Correct | 1 ms | 212 KB | Output is correct |
13 | Correct | 1 ms | 212 KB | Output is correct |