# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
102286 | SirCeness | Go (COCI16_go) | C++14 | 4 ms | 428 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#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 |
---|---|---|---|---|
Fetching results... |