# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
660937 |
2022-11-23T15:02:06 Z |
Trisanu_Das |
Go (COCI16_go) |
C++17 |
|
1 ms |
212 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:7:10: warning: 'n' is used uninitialized in this function [-Wuninitialized]
7 | while(n--){
| ~^~
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
212 KB |
Output isn't correct |
2 |
Incorrect |
0 ms |
212 KB |
Output isn't correct |
3 |
Incorrect |
0 ms |
212 KB |
Output isn't correct |
4 |
Incorrect |
0 ms |
212 KB |
Output isn't correct |
5 |
Incorrect |
1 ms |
212 KB |
Output isn't correct |
6 |
Incorrect |
0 ms |
212 KB |
Output isn't correct |
7 |
Incorrect |
1 ms |
212 KB |
Output isn't correct |
8 |
Incorrect |
0 ms |
212 KB |
Output isn't correct |
9 |
Incorrect |
0 ms |
212 KB |
Output isn't correct |
10 |
Incorrect |
0 ms |
212 KB |
Output isn't correct |
11 |
Incorrect |
0 ms |
212 KB |
Output isn't correct |
12 |
Incorrect |
0 ms |
212 KB |
Output isn't correct |
13 |
Incorrect |
0 ms |
212 KB |
Output isn't correct |
14 |
Incorrect |
0 ms |
212 KB |
Output isn't correct |
15 |
Incorrect |
0 ms |
212 KB |
Output isn't correct |
16 |
Incorrect |
0 ms |
212 KB |
Output isn't correct |
17 |
Incorrect |
0 ms |
212 KB |
Output isn't correct |
18 |
Incorrect |
0 ms |
212 KB |
Output isn't correct |
19 |
Incorrect |
0 ms |
212 KB |
Output isn't correct |
20 |
Incorrect |
1 ms |
212 KB |
Output isn't correct |
21 |
Incorrect |
0 ms |
212 KB |
Output isn't correct |
22 |
Incorrect |
1 ms |
212 KB |
Output isn't correct |
23 |
Incorrect |
0 ms |
212 KB |
Output isn't correct |
24 |
Incorrect |
0 ms |
212 KB |
Output isn't correct |
25 |
Incorrect |
0 ms |
212 KB |
Output isn't correct |