답안 #165563

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
165563 2019-11-27T12:44:38 Z itiam Go (COCI16_go) C++11
50 / 50
3 ms 396 KB
#include <iostream>
#include <algorithm>
#include <cstdio>

using namespace std;

int main(){
    int N,x,y,z,Le[73],m,mi=0,uk=0;
    string A,Ls[73];
    cin >> N;
    for (int i=0;i<N;i++){
        z=0;
        cin >> A;
        cin >> x >> y;
        while (y>=x){
            y-=x;
            z+=1;
            y+=2;
        }
        //cout << "z " << z << "\n";
        uk+=z;
        if (i==0){
            m=z;
        }
        else {
            if (z>m){
                m=z;
                mi=i;
            }
        }
        Le[i]=z;
        Ls[i]=A;
    }
    cout << uk << "\n" << Ls[mi];
    return 0;
}

Compilation message

go.cpp: In function 'int main()':
go.cpp:8:17: warning: variable 'Le' set but not used [-Wunused-but-set-variable]
     int N,x,y,z,Le[73],m,mi=0,uk=0;
                 ^~
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 376 KB Output is correct
2 Correct 2 ms 256 KB Output is correct
3 Correct 2 ms 376 KB Output is correct
4 Correct 2 ms 256 KB Output is correct
5 Correct 2 ms 376 KB Output is correct
6 Correct 2 ms 376 KB Output is correct
7 Correct 2 ms 376 KB Output is correct
8 Correct 2 ms 256 KB Output is correct
9 Correct 2 ms 256 KB Output is correct
10 Correct 2 ms 256 KB Output is correct
11 Correct 2 ms 376 KB Output is correct
12 Correct 2 ms 396 KB Output is correct
13 Correct 2 ms 256 KB Output is correct
14 Correct 2 ms 376 KB Output is correct
15 Correct 2 ms 376 KB Output is correct
16 Correct 2 ms 376 KB Output is correct
17 Correct 2 ms 376 KB Output is correct
18 Correct 2 ms 376 KB Output is correct
19 Correct 2 ms 256 KB Output is correct
20 Correct 2 ms 376 KB Output is correct
21 Correct 2 ms 256 KB Output is correct
22 Correct 2 ms 376 KB Output is correct
23 Correct 3 ms 376 KB Output is correct
24 Correct 2 ms 376 KB Output is correct
25 Correct 2 ms 256 KB Output is correct