Submission #869769

#TimeUsernameProblemLanguageResultExecution timeMemory
869769lalig777Go (COCI16_go)C++14
50 / 50
1 ms600 KiB
#include <iostream> #include <vector> using namespace std; int main(){ int n, ans=0, curr_max=-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 and b%(a-2)<2) c--; ans+=c; if (curr_max<c){ curr_max=c; ans2=s; } }cout<<ans<<endl<<ans2<<endl; }
#Verdict Execution timeMemoryGrader output
Fetching results...