# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
496468 |
2021-12-21T09:43:41 Z |
kappa |
Ljeto (COCI21_ljeto) |
C++14 |
|
1 ms |
332 KB |
#include <bits/stdc++.h>
using namespace std;
int n, p1, p2;
struct event{
int time, from, to, team;
};
event d[105];
int main(){
cin >> n;
for (int i = 0; i < n; i++)
{
cin >> d[i].time >> d[i].from >> d[i].to;
if(d[i].from <= 4){
d[i].team = 1;
}else{
d[i].team = 2;
}
}
for (int i = 0; i < n; i++)
{
if(d[i].team == 1){
p1 += 100;
if(d[i - 1].team == 1 && d[i - 1].time + 10 >= d[i].time && d[i - 1].from == d[i].from){
p1 += 50;
}
}
else{
p2 += 100;
if(d[i - 1].team == 2 && d[i - 1].time + 10 >= d[i].time && d[i - 1].from == d[i].from){
p2 += 50;
}
}
}
cout << p1 << " " << p2;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
332 KB |
Output is correct |
2 |
Correct |
1 ms |
204 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
204 KB |
Output is correct |
2 |
Correct |
0 ms |
204 KB |
Output is correct |
3 |
Correct |
1 ms |
204 KB |
Output is correct |
4 |
Correct |
1 ms |
300 KB |
Output is correct |
5 |
Correct |
1 ms |
296 KB |
Output is correct |
6 |
Correct |
1 ms |
272 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
332 KB |
Output is correct |
2 |
Correct |
1 ms |
204 KB |
Output is correct |
3 |
Correct |
0 ms |
204 KB |
Output is correct |
4 |
Correct |
0 ms |
204 KB |
Output is correct |
5 |
Correct |
1 ms |
204 KB |
Output is correct |
6 |
Correct |
1 ms |
300 KB |
Output is correct |
7 |
Correct |
1 ms |
296 KB |
Output is correct |
8 |
Correct |
1 ms |
272 KB |
Output is correct |
9 |
Correct |
1 ms |
292 KB |
Output is correct |
10 |
Correct |
1 ms |
276 KB |
Output is correct |
11 |
Incorrect |
1 ms |
284 KB |
Output isn't correct |
12 |
Halted |
0 ms |
0 KB |
- |