Submission #1305103

#TimeUsernameProblemLanguageResultExecution timeMemory
1305103hynmjLjeto (COCI21_ljeto)C++20
25 / 50
1 ms576 KiB
#include <bits/stdc++.h> #define int long long using namespace std; const long long N = 2e5 + 5; int a[N]; void solve() { int n; cin >> n; int t, a, b; int red, blue; red = blue = 0; map<int, int> last; for (int i = 0; i < n; i++) { cin >> t >> a >> b; t++; if (last[a] != 0) { if (t - last[a] <= 10) { if (a < 4) { blue += 150; } else red += 150; } else { if (a <= 4) { blue += 100; } else red += 100; last[a] = t; } } else { if (a <= 4) { blue += 100; } else red += 100; last[a] = t; } } cout << blue << " " << red << endl; } signed main() { ios_base::sync_with_stdio(0); cin.tie(NULL); cout.tie(NULL); int t = 1; // cin >> t; for (int i = 1; i <= t; i++) { // cout << "Case #" << i << ':' << ' '; solve(); cout << endl; } return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...