Submission #836033

#TimeUsernameProblemLanguageResultExecution timeMemory
836033exodus_Ljeto (COCI21_ljeto)C++14
50 / 50
1 ms304 KiB
#include<bits/stdc++.h> using namespace std; const int maxn = 1e3+3; bool check(int x) { if(x<=4) return 1; else return 0; } int main() { int n; cin >> n; int tima=0, timb=0; int t,a,b; vector<pair<int,int>>urut; urut.resize(n); for(int i=0; i<n; i++) { cin >> t >> a >> b; if(check(a)) { tima+=100; } else { timb+=100; } urut[i] = {a, t}; } sort(urut.begin(), urut.end()); for(int i=1; i<n; i++) { if(urut[i].second - urut[i-1].second <= 10 && urut[i].first == urut[i-1].first) { if(check(urut[i].first)) { tima+=50; } else { timb+=50; } } } cout << tima << " " << timb << endl; return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...