제출 #499396

#제출 시각아이디문제언어결과실행 시간메모리
499396AramJLjeto (COCI21_ljeto)C++14
25 / 50
1 ms204 KiB
#include <iostream> using namespace std; int main(){ int n; cin>>n; int a[n]; int b[n]; int t[n]; int t1=0; int t2=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=n-1;i>=0;i--){ for(int j=0;j<n;j++){ if(a[i]==a[j]&&i!=j&&abs(t[j]-t[i])<=10){ if(a[i]<=4){ t1+=25; } else if(a[i]>=5){ t2+=25; } } } } cout<<t1<<" "<<t2; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...