# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
102286 |
2019-03-24T06:27:56 Z |
SirCeness |
Go (COCI16_go) |
C++14 |
|
4 ms |
428 KB |
#include <bits/stdc++.h>
#define mod 1000000007
typedef long long ll;
using namespace std;
int n;
int main(){
//freopen("baskent.gir", "r", stdin);
cin >> n;
string ans = "";
int maxx = -1;
int top = 0;
for (int i = 0; i < n; i++){
string s;
int k, m;
cin >> s >> k >> m;
int num = 0;
while (m/k != 0){
int add = m/k;
num += add;
m -= add*k;
m += add*2;
}
top += num;
if (maxx < num){
maxx = num;
ans = s;
}
}
cout << top << endl << ans << endl;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
3 ms |
408 KB |
Output is correct |
2 |
Correct |
2 ms |
256 KB |
Output is correct |
3 |
Correct |
2 ms |
256 KB |
Output is correct |
4 |
Correct |
2 ms |
384 KB |
Output is correct |
5 |
Correct |
3 ms |
256 KB |
Output is correct |
6 |
Correct |
2 ms |
256 KB |
Output is correct |
7 |
Correct |
2 ms |
256 KB |
Output is correct |
8 |
Correct |
1 ms |
384 KB |
Output is correct |
9 |
Correct |
3 ms |
384 KB |
Output is correct |
10 |
Correct |
2 ms |
256 KB |
Output is correct |
11 |
Correct |
3 ms |
384 KB |
Output is correct |
12 |
Correct |
3 ms |
428 KB |
Output is correct |
13 |
Correct |
3 ms |
384 KB |
Output is correct |
14 |
Correct |
3 ms |
384 KB |
Output is correct |
15 |
Correct |
3 ms |
256 KB |
Output is correct |
16 |
Correct |
3 ms |
384 KB |
Output is correct |
17 |
Correct |
2 ms |
256 KB |
Output is correct |
18 |
Correct |
3 ms |
364 KB |
Output is correct |
19 |
Correct |
3 ms |
384 KB |
Output is correct |
20 |
Correct |
3 ms |
384 KB |
Output is correct |
21 |
Correct |
3 ms |
384 KB |
Output is correct |
22 |
Correct |
3 ms |
256 KB |
Output is correct |
23 |
Correct |
3 ms |
256 KB |
Output is correct |
24 |
Correct |
3 ms |
256 KB |
Output is correct |
25 |
Correct |
4 ms |
256 KB |
Output is correct |