Submission #986782

#TimeUsernameProblemLanguageResultExecution timeMemory
986782ezzzayLjeto (COCI21_ljeto)C++14
50 / 50
2 ms2652 KiB
#include<bits/stdc++.h> using namespace std; #define int long long #define ff first #define ss second #define pb push_back const int N=3e5+5; int t[N],a[N],b[N]; signed main(){ int n; cin>>n; t[0]=-20; int p=0,k=0; map<int,int>mp; for(int i=1;i<=8;i++)mp[i]=-20; for(int i=1;i<=n;i++){ cin>>t[i]>>a[i]>>b[i]; if(a[i]<=4){ k+=100; if(t[i]-mp[a[i]]<=10)k+=50; } else{ p+=100; if(t[i]-mp[a[i]]<=10)p+=50; } mp[a[i]]=t[i]; } cout<<k<<" "<<p; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...