Submission #974295

#TimeUsernameProblemLanguageResultExecution timeMemory
974295vjudge1Ljeto (COCI21_ljeto)C++17
50 / 50
1 ms348 KiB
#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 timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...