Submission #1081483

#TimeUsernameProblemLanguageResultExecution timeMemory
1081483Wasif_ShahzadLjeto (COCI21_ljeto)C++17
50 / 50
1 ms440 KiB
#include <bits/stdc++.h> using namespace std; #define int int64_t int32_t main(){ #ifndef ONLINE_JUDGE // freopen("in.txt", "r", stdin); // freopen("out.txt", "w", stdout); #endif int n; cin >> n; vector<int> last(9, -1ll); int sc1 = 0, sc2 = 0; for(int i = 0; i < n; i++){ int t, a, b; cin >> t >> a >> b; if(t - last[a] <= 10 && last[a] != -1){ (a <= 4 ? sc1 += 150 : sc2 += 150); } else{ (a <= 4 ? sc1 += 100 : sc2 += 100); } last[a] = t; } cout << sc1 << " " << sc2 << "\n"; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...