# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
660936 |
2022-11-23T15:01:50 Z |
Trisanu_Das |
Go (COCI16_go) |
C++17 |
|
0 ms |
0 KB |
#include <bits/stdc++.h>
using namespace std;
int main(){
int n, need, has, ans = 0, mx = 0, cnt;
string pok, anss;
while(n--){
cin >> pok >> need >> has;
cnt = 0;
while(need <= has){
cnt++; has -= need - 2;
}
ans += cnt;
if(cnt > mx){
mx = cnt; anss = pok;
}
}
cout << ans << '\n' << anss << '\n';
Compilation message
go.cpp: In function 'int main()':
go.cpp:18:38: error: expected '}' at end of input
18 | cout << ans << '\n' << anss << '\n';
| ^
go.cpp:4:11: note: to match this '{'
4 | int main(){
| ^