#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;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
2 ms |
380 KB |
Output isn't correct |
2 |
Incorrect |
2 ms |
380 KB |
Output isn't correct |
3 |
Incorrect |
2 ms |
440 KB |
Output isn't correct |
4 |
Incorrect |
2 ms |
500 KB |
Output isn't correct |
5 |
Incorrect |
2 ms |
524 KB |
Output isn't correct |
6 |
Incorrect |
2 ms |
524 KB |
Output isn't correct |
7 |
Incorrect |
5 ms |
532 KB |
Output isn't correct |
8 |
Incorrect |
5 ms |
532 KB |
Output isn't correct |
9 |
Incorrect |
5 ms |
532 KB |
Output isn't correct |
10 |
Incorrect |
5 ms |
584 KB |
Output isn't correct |
11 |
Incorrect |
5 ms |
584 KB |
Output isn't correct |
12 |
Incorrect |
6 ms |
584 KB |
Output isn't correct |
13 |
Incorrect |
25 ms |
584 KB |
Output isn't correct |
14 |
Incorrect |
54 ms |
584 KB |
Output isn't correct |
15 |
Incorrect |
108 ms |
584 KB |
Output isn't correct |
16 |
Incorrect |
116 ms |
584 KB |
Output isn't correct |
17 |
Incorrect |
151 ms |
584 KB |
Output isn't correct |
18 |
Incorrect |
167 ms |
584 KB |
Output isn't correct |
19 |
Incorrect |
176 ms |
584 KB |
Output isn't correct |
20 |
Incorrect |
202 ms |
584 KB |
Output isn't correct |