Submission #920592

#TimeUsernameProblemLanguageResultExecution timeMemory
920592SuPythonyLjeto (COCI21_ljeto)C++17
50 / 50
1 ms600 KiB
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main() { int n; cin>>n; vector<int> score(2, 0); vector<int> prev_t(8, -1); while (n--) { int t,a,b; cin>>t>>a>>b; if (a<=4) { score[0]+=100; } else { score[1]+=100; } if (prev_t[a]==-1) prev_t[a]=t; else { if (t-prev_t[a]<=10) { if (a<=4) score[0]+=50; else score[1]+=50; } prev_t[a]=t; } } cout<<score[0]<<" "<<score[1]; return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...