Submission #584617

#TimeUsernameProblemLanguageResultExecution timeMemory
584617Bana_Ashoor7777Ljeto (COCI21_ljeto)C++14
25 / 50
1 ms300 KiB
#include <bits/stdc++.h> using namespace std; typedef long long ll; vector <ll> v; vector <ll> v1; vector <ll> v2; int main() { ll n; cin>>n; ll sum1=0,sum2=0; for(int i=0;i<n;i++) {ll t,a,b; cin>>t>>a>>b; v.push_back(t); v1.push_back(a); v2.push_back(b); } if(v1[0]>=1 && v1[0]<=4) sum1+=100; else sum2+=100; for(int i=1;i<n;i++) { if(v1[i]>=1 && v1[i]<=4) {sum1+=100; if(v[i]-v[i-1]<=10 && v1[i]==v1[i-1]) sum1+=50; } else {sum2+=100; if(v[i]-v[i-1]<=10 && v1[i]==v1[i-1]) sum2+=50; } } cout<<sum1<<" "<<sum2<<endl; return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...