Submission #94135

#TimeUsernameProblemLanguageResultExecution timeMemory
94135HutchGo (COCI16_go)C++14
50 / 50
2 ms380 KiB
#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 timeMemoryGrader output
Fetching results...