Submission #559545

#TimeUsernameProblemLanguageResultExecution timeMemory
559545kappaGo (COCI16_go)C++14
50 / 50
1 ms340 KiB
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define pb push_back #define st first #define nd second #define MOD 1000000007 typedef pair<ll, ll> pii; const ll maxn = 1e2 + 5; ll n, ansi, sum; string ans; int main(){ cin >> n; for (int i = 0; i < n; i++) { string str; ll a, b; cin >> str; cin >> a >> b; if(b >= a){ b -= 2; a -= 2; sum += b / a; if(b / a > ansi){ ansi = b / a; ans = str; } } } cout << sum << "\n" << ans; }
#Verdict Execution timeMemoryGrader output
Fetching results...