# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
851310 |
2023-09-19T14:17:57 Z |
pakapu |
Ljeto (COCI21_ljeto) |
C++17 |
|
1 ms |
452 KB |
#include <bits/stdc++.h>
using namespace std;
bool is_from_first_team(int x) {
return x >= 1 && x <= 4;
}
signed main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
int last_at = -100;
int last_bt = -100;
int a_cnt = 0;
int b_cnt = 0;
int n;
cin >> n;
for(int i = 0; i < n; i++) {
int t, a, b;
cin >> t >> a >> b;
if(is_from_first_team(a)) {
a_cnt += 100;
if(t - last_at <= 10) {
a_cnt += 50;
}
last_at = t;
}
else {
b_cnt += 100;
if(t - last_bt <= 10) {
b_cnt += 50;
}
last_bt = t;
}
}
cout << a_cnt << ' ' << b_cnt << '\n';
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
344 KB |
Output is correct |
2 |
Correct |
1 ms |
452 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
348 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
344 KB |
Output is correct |
2 |
Correct |
1 ms |
452 KB |
Output is correct |
3 |
Incorrect |
1 ms |
348 KB |
Output isn't correct |
4 |
Halted |
0 ms |
0 KB |
- |