답안 #98352

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
98352 2019-02-22T17:57:21 Z dalgerok Go (COCI16_go) C++17
50 / 50
3 ms 388 KB
#include<bits/stdc++.h>
using namespace std;




int main(){
    ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
    int test;
    cin >> test;
    pair < int, pair < int, string > > mx;
    int ans = 0;
    for(int i = 1; i <= test; i++){
        string s;
        cin >> s;
        int x, y;
        cin >> x >> y;
        int cur = 0;
        while(y - x >= 0){
            y -= x;
            y += 2;
            ans += 1;
            cur += 1;
        }
        mx = max(mx, make_pair(cur, make_pair(-i, s)));
    }
    cout << ans << "\n";
    cout << mx.second.second;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 384 KB Output is correct
2 Correct 2 ms 384 KB Output is correct
3 Correct 2 ms 384 KB Output is correct
4 Correct 2 ms 384 KB Output is correct
5 Correct 2 ms 384 KB Output is correct
6 Correct 2 ms 384 KB Output is correct
7 Correct 2 ms 384 KB Output is correct
8 Correct 2 ms 384 KB Output is correct
9 Correct 2 ms 384 KB Output is correct
10 Correct 2 ms 384 KB Output is correct
11 Correct 2 ms 384 KB Output is correct
12 Correct 2 ms 384 KB Output is correct
13 Correct 3 ms 384 KB Output is correct
14 Correct 2 ms 384 KB Output is correct
15 Correct 3 ms 384 KB Output is correct
16 Correct 2 ms 384 KB Output is correct
17 Correct 2 ms 384 KB Output is correct
18 Correct 2 ms 384 KB Output is correct
19 Correct 2 ms 384 KB Output is correct
20 Correct 2 ms 384 KB Output is correct
21 Correct 2 ms 384 KB Output is correct
22 Correct 2 ms 388 KB Output is correct
23 Correct 2 ms 384 KB Output is correct
24 Correct 3 ms 384 KB Output is correct
25 Correct 2 ms 384 KB Output is correct