# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
208862 | 2020-03-12T10:57:53 Z | Sensei | Go (COCI16_go) | C++14 | 6 ms | 504 KB |
/* DATE: 2020-03-12 13:53:43 NAME: PROBLEM: COCI16_GO */ #include <bits/stdc++.h> using namespace std; const int MAXN = 70; int k[MAXN + 7]; int m[MAXN + 7]; string st[MAXN + 7]; int main() { int n; cin >> n; for (int i = 1; i <= n; i++) { cin >> st[i]; scanf("%d %d", &k[i], &m[i]); } int ansv = -1; string ans; for (int i = 1; i <= n; i++) { int cnt = 0; while (m[i] >= k[i]) { m[i] -= k[i]; m[i] += 2; cnt++; } if (cnt > ansv) { ansv = cnt; ans = st[i]; } } cout << ansv << "\n" << ans << "\n"; return 0; }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Partially correct | 5 ms | 256 KB | Partially correct |
2 | Partially correct | 5 ms | 256 KB | Partially correct |
3 | Partially correct | 5 ms | 256 KB | Partially correct |
4 | Partially correct | 5 ms | 504 KB | Partially correct |
5 | Partially correct | 5 ms | 376 KB | Partially correct |
6 | Partially correct | 5 ms | 376 KB | Partially correct |
7 | Partially correct | 5 ms | 256 KB | Partially correct |
8 | Partially correct | 5 ms | 376 KB | Partially correct |
9 | Partially correct | 5 ms | 256 KB | Partially correct |
10 | Partially correct | 5 ms | 256 KB | Partially correct |
11 | Partially correct | 5 ms | 376 KB | Partially correct |
12 | Partially correct | 5 ms | 256 KB | Partially correct |
13 | Partially correct | 5 ms | 256 KB | Partially correct |
14 | Partially correct | 5 ms | 256 KB | Partially correct |
15 | Partially correct | 5 ms | 256 KB | Partially correct |
16 | Partially correct | 5 ms | 256 KB | Partially correct |
17 | Partially correct | 5 ms | 256 KB | Partially correct |
18 | Partially correct | 5 ms | 256 KB | Partially correct |
19 | Partially correct | 5 ms | 256 KB | Partially correct |
20 | Partially correct | 5 ms | 376 KB | Partially correct |
21 | Partially correct | 5 ms | 248 KB | Partially correct |
22 | Partially correct | 5 ms | 256 KB | Partially correct |
23 | Partially correct | 5 ms | 256 KB | Partially correct |
24 | Partially correct | 5 ms | 256 KB | Partially correct |
25 | Partially correct | 6 ms | 256 KB | Partially correct |