Submission #170320

#TimeUsernameProblemLanguageResultExecution timeMemory
170320ngmhGo (COCI16_go)C++11
50 / 50
2 ms408 KiB
#include <bits/stdc++.h> using namespace std; typedef pair<long long, long long> pi; long long n, a[70], b[70], t, m, p = 80, l; string c[70]; int main(){ cin >> n; for(int i = 0; i < n; i++){ cin >> c[i] >> a[i] >> b[i]; t = 0; if(a[i] > b[i]) continue; while(true){ b[i] -= a[i]; if(b[i] < 0) break; t++; l++; b[i] += 2; } if(t > m){ m = t; p = i; } } cout << l << "\n" << c[p]; }
#Verdict Execution timeMemoryGrader output
Fetching results...