# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
83045 | jvalsortav | Go (COCI16_go) | C++14 | 3 ms | 828 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 <cstdio>
#include <cstdlib>
#include <cmath>
#include <iostream>
#include <cctype>
#include <ctime>
#include <set>
#include <string>
#include <map>
using namespace std;
int n, k, m, c, x, y;
string s, mx;
int main() {
cin >> n;
cin >> s;
mx = s;
cin >> k >> m;
while (k <= m){
m = m - k + 2;
c++;
}
x = c;
for (int i = 1; i < n; i++){
cin >> s;
cin >> k >> m;
y = 0;
while (k <= m){
m = m - k + 2;
c++;
y++;
}
if (y > x){
mx = s;
x = y;
}
}
cout << c << endl << mx;
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |