Submission #698638

#TimeUsernameProblemLanguageResultExecution timeMemory
698638ld_minh4354Ljeto (COCI21_ljeto)C++14
50 / 50
1 ms316 KiB
#include<bits/stdc++.h> using namespace std; #define int long long #define fi first #define se second #define pb push_back signed main() { ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0); // freopen("input.000","r",stdin); // freopen("output.000","w",stdout); // srand((unsigned)time(NULL)); // rand() int n,i,t,a,b,l[10],a_ans,b_ans; for (i=1;i<9;i++) l[i]=-1e9; a_ans=0;b_ans=0; cin>>n; for (i=1;i<n+1;i++) { cin>>t>>a>>b; if (a<=4) a_ans+=100;else b_ans+=100; if (t-l[a]<=10) { if (a<=4) a_ans+=50;else b_ans+=50; } l[a]=t; } cout<<a_ans<<" "<<b_ans; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...