Submission #784129

#TimeUsernameProblemLanguageResultExecution timeMemory
784129serifefedartarLjeto (COCI21_ljeto)C++17
50 / 50
1 ms324 KiB
#include <bits/stdc++.h> using namespace std; #define fast ios::sync_with_stdio(0);cin.tie(0); typedef long long ll; #define f first #define s second #define MAXN 100005 int last[9]; int main() { memset(last, -1, sizeof(last)); fast int n; cin >> n; int pnt1 = 0, pnt2 = 0; for (int i = 0; i < n; i++) { int t, a, b; cin >> t >> a >> b; if (last[a] != -1 && last[a] + 10 >= t) { if (a <= 4) { pnt1 += 150; last[a] = t; } else { pnt2 += 150; last[a] = t; } } else { if (a <= 4) { pnt1 += 100; last[a] = t; } else { pnt2 += 100; last[a] = t; } } } cout << pnt1 << " " << pnt2 << endl; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...