# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
94135 | Hutch | Go (COCI16_go) | C++14 | 2 ms | 380 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;
struct node{
string name;
int evolve;
int mus,sum;
};
node arr[100];
int main(){
int n;
cin>>n;
int ans=0;
int maxn=0;
string maxname;
for(int i=0;i<n;i++){
cin>>arr[i].name;
cin>>arr[i].mus>>arr[i].sum;
arr[i].evolve=(arr[i].sum/(arr[i].mus-2));
if(arr[i].sum%(arr[i].mus-2)<2 && arr[i].sum>arr[i].mus)
arr[i].evolve--;
if(arr[i].evolve>maxn){
maxn=arr[i].evolve;
maxname=arr[i].name;
}
ans+=arr[i].evolve;
}
cout<<ans<<endl<<maxname<<endl;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |