Submission #869515

#TimeUsernameProblemLanguageResultExecution timeMemory
869515JoksimKaktusLjeto (COCI21_ljeto)C++17
50 / 50
1 ms460 KiB
#include <bits/stdc++.h> using namespace std; using ll = long long; int main(){ ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(0); int n; cin >> n; vector <int> v[9]; for(int i = 0;i < n;i++){ int t,a,b; cin >> t >> a >> b; v[a].push_back(t); } int res1 = 0; int res2 = 0; int last = -100; for(int i = 1;i <= 4;i++){ for(int j : v[i]){ if(j - 10 <= last){ res1 += 50; } res1 += 100; last = j; } last = -100; } for(int i = 5;i <= 8;i++){ for(int j : v[i]){ if(j - 10 <= last){ res2 += 50; } res2 += 100; last = j; } last = -100; } cout << res1 << " " << res2 << "\n"; return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...