# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
660936 | Trisanu_Das | Go (COCI16_go) | C++17 | 0 ms | 0 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;
int main(){
int n, need, has, ans = 0, mx = 0, cnt;
string pok, anss;
while(n--){
cin >> pok >> need >> has;
cnt = 0;
while(need <= has){
cnt++; has -= need - 2;
}
ans += cnt;
if(cnt > mx){
mx = cnt; anss = pok;
}
}
cout << ans << '\n' << anss << '\n';