Submission #499399

#TimeUsernameProblemLanguageResultExecution timeMemory
499399adamLjeto (COCI21_ljeto)C++14
25 / 50
1 ms204 KiB
#include <iostream> using namespace std; int main() { int n; cin>>n; int sum1=0,sum2=0; int a[n],b[n],c[n]; for(int i=0;i<n;i++){ cin>>a[i]>>b[i]>>c[i]; if(a[i]-a[i-1]<=10&&b[i]==b[i-1]&&b[i]>=5)sum2+=50; if((a[i]-a[i-1]<=10&&b[i]==b[i-1]&&b[i]<5))sum1+=50; if(b[i]<5)sum1+=100; if(b[i]>=5)sum2+=100; } cout<<sum1<<' '<<sum2; return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...