# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
88960 | nika | Schools (IZhO13_school) | C++14 | 220 ms | 632 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <iostream>
using namespace std;
int main()
{
int a,i,b,c,d,e,n=0,z=0;
cin>>e>>a>>b;
if(a+b>e){
return 0;
}
for(i=1;i<=e;i++){
cin>>c>>d;
if(n<=c*a+d*b){
n=c*a+d*b;
}
}
if(a==b){
n=n-a;
}
else
n=n-1-max(a,b);
cout<<n;
return 0;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |