# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
974295 |
2024-05-03T07:39:38 Z |
vjudge1 |
Ljeto (COCI21_ljeto) |
C++17 |
|
1 ms |
348 KB |
#include <bits/stdc++.h>
using namespace std;
#define ll long long
int main()
{
int last_attack[8] = {0};
int points[2] = {0};
int n;
cin >> n;
int doublehit = 0;
for (int i = 0; i < n; i++)
{
int time;
cin >> time;
int attacker, receiver;
cin >> attacker >> receiver;
attacker--;
receiver--;
if (attacker <= 3)
{ // elang menyerang bebek
if (last_attack[attacker] != 0 && abs(last_attack[attacker] - time) <= 10)
{
points[0] += 50;
doublehit++;
}
last_attack[attacker] = time;
points[0] += 100;
}
else
{ // bebek menyerang elang
if (last_attack[attacker] != 0 && abs(last_attack[attacker] - time) <= 10)
{
points[1] += 50;
doublehit++;
}
last_attack[attacker] = time;
points[1] += 100;
}
}
for (int i : points)
{
cout << i << " ";
}
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
348 KB |
Output is correct |
2 |
Correct |
1 ms |
348 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
348 KB |
Output is correct |
2 |
Correct |
0 ms |
348 KB |
Output is correct |
3 |
Correct |
0 ms |
348 KB |
Output is correct |
4 |
Correct |
0 ms |
348 KB |
Output is correct |
5 |
Correct |
0 ms |
348 KB |
Output is correct |
6 |
Correct |
0 ms |
348 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
348 KB |
Output is correct |
2 |
Correct |
1 ms |
348 KB |
Output is correct |
3 |
Correct |
0 ms |
348 KB |
Output is correct |
4 |
Correct |
0 ms |
348 KB |
Output is correct |
5 |
Correct |
0 ms |
348 KB |
Output is correct |
6 |
Correct |
0 ms |
348 KB |
Output is correct |
7 |
Correct |
0 ms |
348 KB |
Output is correct |
8 |
Correct |
0 ms |
348 KB |
Output is correct |
9 |
Correct |
0 ms |
348 KB |
Output is correct |
10 |
Correct |
1 ms |
344 KB |
Output is correct |
11 |
Correct |
0 ms |
348 KB |
Output is correct |
12 |
Correct |
0 ms |
348 KB |
Output is correct |
13 |
Correct |
0 ms |
348 KB |
Output is correct |