Submission #986769

#TimeUsernameProblemLanguageResultExecution timeMemory
986769ezzzayLjeto (COCI21_ljeto)C++14
25 / 50
1 ms600 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; for(int i=1;i<=n;i++){ cin>>t[i]>>a[i]>>b[i]; if(a[i]<=4){ if(t[i]-t[i-1]<=10 and a[i]==a[i-1]){ k+=150; } else{ k+=100; } } else{ if(t[i]-t[i-1]<=10 and a[i]==a[i-1]){ p+=150; } else{ p+=100; } } } cout<<k<<" "<<p; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...