답안 #88960

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
88960 2018-12-10T07:08:16 Z nika 학교 설립 (IZhO13_school) C++14
0 / 100
220 ms 632 KB
#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

school.cpp: In function 'int main()':
school.cpp:7:25: warning: unused variable 'z' [-Wunused-variable]
     int a,i,b,c,d,e,n=0,z=0;
                         ^
# 결과 실행 시간 메모리 Grader output
1 Incorrect 2 ms 256 KB Output isn't correct
2 Incorrect 2 ms 372 KB Output isn't correct
3 Incorrect 2 ms 576 KB Output isn't correct
4 Incorrect 2 ms 616 KB Output isn't correct
5 Incorrect 2 ms 616 KB Output isn't correct
6 Incorrect 2 ms 616 KB Output isn't correct
7 Incorrect 5 ms 616 KB Output isn't correct
8 Incorrect 5 ms 616 KB Output isn't correct
9 Incorrect 5 ms 616 KB Output isn't correct
10 Incorrect 5 ms 624 KB Output isn't correct
11 Incorrect 5 ms 624 KB Output isn't correct
12 Incorrect 5 ms 624 KB Output isn't correct
13 Incorrect 26 ms 624 KB Output isn't correct
14 Incorrect 55 ms 624 KB Output isn't correct
15 Incorrect 103 ms 632 KB Output isn't correct
16 Incorrect 115 ms 632 KB Output isn't correct
17 Incorrect 149 ms 632 KB Output isn't correct
18 Incorrect 167 ms 632 KB Output isn't correct
19 Incorrect 177 ms 632 KB Output isn't correct
20 Incorrect 220 ms 632 KB Output isn't correct