Submission #1032725

#TimeUsernameProblemLanguageResultExecution timeMemory
1032725vjudge1Ljeto (COCI21_ljeto)C++17
50 / 50
1 ms432 KiB
#include <bits/stdc++.h> using namespace std; #define ll long long int const N=2e5+5; int const inf=1e9+7; void solve(){ int n; cin>>n; int prev[9]; for (int i = 0; i < 9; ++i) prev[i]=-inf; int c1=0,c2=0; for (int i = 0; i < n; ++i) { int t,a,b; cin>>t>>a>>b; if(a<=4){ c1+=100; if(prev[a]+10>=t) c1+=50; prev[a]=t; } else{ c2+=100; if(prev[a]+10>=t) c2+=50; prev[a]=t; } } cout<<c1<<' '<<c2<<endl; } int main(){ int t=1; // cin>>t; while(t--) solve(); return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...