# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
717341 |
2023-04-01T21:03:33 Z |
TheSahib |
Ljeto (COCI21_ljeto) |
C++17 |
|
1 ms |
300 KB |
#include <bits/stdc++.h>
#define ll long long
#define oo 1e9
#define pii pair<int, int>
using namespace std;
int lastTime[9];
void solve(){
int n; cin >> n;
for (int i = 0; i < 9; i++)
{
lastTime[i] = -oo;
}
int ans1 = 0;
int ans2 = 0;
for (int i = 0; i < n; i++)
{
int t, a, b; cin >> t >> a >> b;
if(a <= 4) ans1 += 100;
else ans2 += 100;
if(t - lastTime[a] <= 10)
{
if(a <= 4) ans1 += 50;
else ans2 += 50;
}
lastTime[a] = t;
}
cout << ans1 << ' ' << ans2;
}
int main()
{
solve();
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
212 KB |
Output is correct |
2 |
Correct |
0 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 |
300 KB |
Output is correct |
3 |
Correct |
1 ms |
212 KB |
Output is correct |
4 |
Correct |
1 ms |
296 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 |
0 ms |
212 KB |
Output is correct |
3 |
Correct |
1 ms |
212 KB |
Output is correct |
4 |
Correct |
1 ms |
300 KB |
Output is correct |
5 |
Correct |
1 ms |
212 KB |
Output is correct |
6 |
Correct |
1 ms |
296 KB |
Output is correct |
7 |
Correct |
1 ms |
212 KB |
Output is correct |
8 |
Correct |
1 ms |
212 KB |
Output is correct |
9 |
Correct |
1 ms |
296 KB |
Output is correct |
10 |
Correct |
1 ms |
300 KB |
Output is correct |
11 |
Correct |
1 ms |
212 KB |
Output is correct |
12 |
Correct |
1 ms |
296 KB |
Output is correct |
13 |
Correct |
1 ms |
300 KB |
Output is correct |