Submission #88964

#TimeUsernameProblemLanguageResultExecution timeMemory
88964nika학교 설립 (IZhO13_school)C++14
0 / 100
207 ms636 KiB
#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 timeMemoryGrader output
Fetching results...