Submission #999262

#TimeUsernameProblemLanguageResultExecution timeMemory
999262AliHasanliGo (COCI16_go)C++17
50 / 50
1 ms604 KiB
#include <bits/stdc++.h> using namespace std; int main(){ int n,ans=0,curmax=-1; string ans2; cin>>n; while(n--) { string s; cin>>s; int a,b,c; cin>>a>>b; c=b/(a-2); if(c>0 && b%(a-2)<=1) c--; ans+=c; if(curmax<c) { curmax=c; ans2=s; } }cout<<ans<<endl<<ans2<<endl; }
#Verdict Execution timeMemoryGrader output
Fetching results...