# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
712524 | gnhmhp | Go (COCI16_go) | C++14 | 1 ms | 328 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.
#define fastio ios_base::sync_with_stdio(false); cin.tie(nullptr)
#include <bits/stdc++.h>
using namespace std;
const int maxn=100;
int n, m, k, mx=-1;
long long sum=0;
string s, a;
int main()
{
fastio;
cin >> n;
for (int i=1; i<=n; ++i)
{
int cur=0;
cin >> s >> k >> m;
if (m>k) cur=(m-k)/(k-2)+1;
if (mx<cur) mx=cur, a=s;
sum+=cur;
}
cout << sum << '\n' << a;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |