# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
869769 | lalig777 | Go (COCI16_go) | C++14 | 1 ms | 600 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 <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 time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |