# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
88976 | nika | Schools (IZhO13_school) | C++14 | 212 ms | 688 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 <bits/stdc++.h>
using namespace std;
long long int a,i,b,c,d,e,n=0;
int main()
{
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;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |