This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#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 |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |