답안 #88449

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
88449 2018-12-06T01:11:57 Z xiaowuc1 Go (COCI16_go) C++14
50 / 50
3 ms 832 KB
#include <bits/stdc++.h>

using namespace std;

void solve() {
  int n;
  cin >> n;
  int ret = 0;
  int best = -1;
  string curr = "";
  while(n--) {
    string s;
    cin >> s;
    int a, b;
    cin >> a >> b;
    int now = 0;
    while(b >= a) {
      b -= a-2;
      now++;
    }
    ret += now;
    if(now > best) {
      best = now;
      curr = s; 
    }
  }
  cout << ret << endl;
  cout << curr << endl;
}

int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  solve();
}
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 376 KB Output is correct
2 Correct 2 ms 464 KB Output is correct
3 Correct 2 ms 464 KB Output is correct
4 Correct 2 ms 472 KB Output is correct
5 Correct 2 ms 516 KB Output is correct
6 Correct 2 ms 524 KB Output is correct
7 Correct 2 ms 672 KB Output is correct
8 Correct 2 ms 724 KB Output is correct
9 Correct 2 ms 724 KB Output is correct
10 Correct 2 ms 724 KB Output is correct
11 Correct 2 ms 724 KB Output is correct
12 Correct 2 ms 760 KB Output is correct
13 Correct 2 ms 784 KB Output is correct
14 Correct 2 ms 788 KB Output is correct
15 Correct 2 ms 792 KB Output is correct
16 Correct 2 ms 796 KB Output is correct
17 Correct 2 ms 800 KB Output is correct
18 Correct 2 ms 808 KB Output is correct
19 Correct 3 ms 808 KB Output is correct
20 Correct 2 ms 812 KB Output is correct
21 Correct 2 ms 816 KB Output is correct
22 Correct 2 ms 820 KB Output is correct
23 Correct 2 ms 824 KB Output is correct
24 Correct 2 ms 828 KB Output is correct
25 Correct 2 ms 832 KB Output is correct