# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
94128 | farukkastamonuda | 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 md 1000000007
#define fi first
#define se second
#define mp make_pair
#define inf 1000000000
#define li 25
#define lo long long
#define pb push_back
#define mid (start+end)/2
using namespace std;
int n,a,b,cev[75],topla,mx;
string s[75];
int main(){
scanf("%d",&n);
for(int i=1;i<=n;i++){
cin>>s[i];
scanf("%d %d",&a,&b);
int say=0;
while(b>=a){
say++;
b-=a;
b+=2;
}
cev[i]=say;
topla+=say;
mx=max(mx,say);
}
printf("%d\n",topla);
for(int i=1;i<=n;i++){
if(mx==cev[i]){
cout<<s[i]<<'\n';
return 0;
}
}
return 0;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |