| # | Time | Username | Problem | Language | Result | Execution time | Memory | 
|---|---|---|---|---|---|---|---|
| 631485 | berr | Go (COCI16_go) | C++17 | 1 ms | 340 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>
using namespace std;
int32_t main()
{
    ios_base::sync_with_stdio(false); cin.tie(0);
    int n; cin>>n;
    vector<array<int, 3>> a(n); 
    vector<string> b(n);
    int sum=0, ma=-1, ind=0;
    for(int i=0; i<n; i++)
    {
        string s; cin>>s;
        int x, y; cin>>x>>y;
        int se=0;
        while(y>=x)
        {
            se+=y/x;
            y=y/x*2+y%x;
        }
        b[i]=s;
        sum+=se;
        if(se>ma)
        {
            ma=se;
            ind=i;
        }
    }
    cout<<sum<<"\n";
    cout<<b[ind]<<"\n";
}
| # | Verdict | Execution time | Memory | Grader output | 
|---|---|---|---|---|
| Fetching results... | ||||
