Submission #499424

#TimeUsernameProblemLanguageResultExecution timeMemory
499424RandeLjeto (COCI21_ljeto)C++14
25 / 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; int ans1 = 0; int 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(y==b && y<5 && abs(x-a)<=10){ ans1 += 150; } else if(y==b && y<5 && abs(x-a)>10){ ans1 += 100; } else if(y==b && y>4 && abs(x-a)<=10){ ans2 += 150; } else if(y==b && 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...