# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
94132 | hamzqq9 | Go (COCI16_go) | C++14 | 2 ms | 376 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 st first
#define nd second
#define pb push_back
#define ppb pop_back
#define ppf pop_front
#define umax(x,y) x=max(x,y)
#define umin(x,y) x=min(x,y)
#define ll long long
#define ii pair<int,int>
#define iii pair<ii,int>
#define iiii pair<ii,ii>
#define sz(x) ((int) x.size())
#define orta ((bas+son)/2)
#define all(x) x.begin(),x.end()
#define dbgs(x) cerr<<(#x)<<" --> "<<(x)<<" "
#define dbg(x) cerr<<(#x)<<" --> "<<(x)<<endl;getchar()
#define pw(x) (1<<(x))
#define inf 1000000000000000000ll
#define MOD 1000000007
#define N 100005
#define M 15000005
#define LOG 20
#define KOK 650
#define EPS 0.00001
using namespace std;
int n,x,y,ans,t,mx;
char s[100][100];
int main() {
// freopen("input.txt","r",stdin);
scanf("%d",&n);
for(int i=1;i<=n;i++) {
scanf("%s",s[i]+1);
scanf("%d %d",&x,&y);
int cnt=(y-2)/(x-2);
ans+=cnt;
if(cnt>mx) {
mx=cnt;
t=i;
}
}
printf("%d\n%s",ans,s[t]+1);
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |