Submission #499428

#TimeUsernameProblemLanguageResultExecution timeMemory
499428RandeLjeto (COCI21_ljeto)C++14
10 / 50
1 ms204 KiB
#include<bits/stdc++.h> using namespace std; int main(){ int n; cin>>n; int a,b,c; cin>>a>>b>>c; long long ans1 = 0; long long ans2 = 0; if(b<5){ ans1 = 100; } else{ ans2 = 100; } for(int i=1 ; i<n ; i++){ int x,y,z; cin>>x>>y>>z; if(b<5 && y<5 && abs(x-a)<=10){ ans1 += 150; } else if(b<5 && y<5 && abs(x-a)>10){ ans1 += 100; } else if(b>4 && y>4 && abs(x-a)<=10){ ans2 += 150; } else if(b>4 && y>4 && abs(x-a)>10){ ans2 += 100; } else if(y>4){ ans2 += 100; } else if(y<5){ ans1 += 100; } a = x; b = y; c = z; } cout << ans1 <<" " << ans2 << endl; return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...