Submission #920411

#TimeUsernameProblemLanguageResultExecution timeMemory
920411SuPythonyLjeto (COCI21_ljeto)C++17
25 / 50
0 ms348 KiB
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main() { int n; cin>>n; ll prev=-1; ll prev_p=0; ll pi=0; ll bl=0; while (n--) { ll t; ll a,b; cin>>t>>a>>b; if (prev==-1) { prev=t; prev_p=a; if (a<=4) pi+=100; else bl+=100; } else { if (prev+10>=t&&a==prev_p) { prev=t; if (a<=4) pi+=150; else bl+=150; } else { prev=t; prev_p=a; if (a<=4) pi+=100; else bl+=100; } } } cout<<pi<<" "<<bl; return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...