Submission #499412

#TimeUsernameProblemLanguageResultExecution timeMemory
499412AramJLjeto (COCI21_ljeto)C++14
0 / 50
0 ms204 KiB
#include <iostream> using namespace std; int main(){ int n; int h[8]={1,2,3,4,5,6,7,8}; cin>>n; int a[n]; int b[n]; int t[n]; int t1=0; int t2=0; int f=0; int f2=0; for(int i=0;i<n;i++){ cin>>t[i]>>a[i]>>b[i]; } for(int i=0;i<n;i++){ if(a[i]<=4&&b[i]>=5){ t1+=100; } else if(a[i]>=5&&b[i]<=4){ t2+=100; } } for(int i=0;i<n;i++){ for(int j=0;j<n;j++){ if(h[i]==a[j]&&i!=j&&abs(t[i]-t[j])<=10){ if(h[i]<=4){ t1+=50; } else if(h[i]>=5){ t2+=50; } } } } cout<<t1<<" "<<t2; }

Compilation message (stderr)

Main.cpp: In function 'int main()':
Main.cpp:12:5: warning: unused variable 'f' [-Wunused-variable]
   12 | int f=0;
      |     ^
Main.cpp:13:5: warning: unused variable 'f2' [-Wunused-variable]
   13 | int f2=0;
      |     ^~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...