# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
397494 | Iwanttobreakfree | Go (COCI16_go) | C++98 | 1 ms | 208 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 <iostream>
#include <map>
using namespace std;
int main(){
long long int n,can,cantot,sum=0,maxi=0,cont;
string pok,g;
cin>>n;
while(n--){
cin>>pok;
cin>>can>>cantot;
cont=0;
while(can<=cantot){
cont++;
cantot-=can;
cantot+=2;
}
//cout<<pok<<' '<<cont<<'\n';
sum+=cont;
if(cont>maxi){
maxi=cont;
g=pok;
}
}
cout<<sum<<'\n';
cout<<g;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |