Submission #712524

#TimeUsernameProblemLanguageResultExecution timeMemory
712524gnhmhpGo (COCI16_go)C++14
50 / 50
1 ms328 KiB
#define fastio ios_base::sync_with_stdio(false); cin.tie(nullptr) #include <bits/stdc++.h> using namespace std; const int maxn=100; int n, m, k, mx=-1; long long sum=0; string s, a; int main() { fastio; cin >> n; for (int i=1; i<=n; ++i) { int cur=0; cin >> s >> k >> m; if (m>k) cur=(m-k)/(k-2)+1; if (mx<cur) mx=cur, a=s; sum+=cur; } cout << sum << '\n' << a; }
#Verdict Execution timeMemoryGrader output
Fetching results...