# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
94128 | 2019-01-16T11:16:33 Z | farukkastamonuda | Go (COCI16_go) | C++14 | 2 ms | 376 KB |
#include <bits/stdc++.h> #define md 1000000007 #define fi first #define se second #define mp make_pair #define inf 1000000000 #define li 25 #define lo long long #define pb push_back #define mid (start+end)/2 using namespace std; int n,a,b,cev[75],topla,mx; string s[75]; int main(){ scanf("%d",&n); for(int i=1;i<=n;i++){ cin>>s[i]; scanf("%d %d",&a,&b); int say=0; while(b>=a){ say++; b-=a; b+=2; } cev[i]=say; topla+=say; mx=max(mx,say); } printf("%d\n",topla); for(int i=1;i<=n;i++){ if(mx==cev[i]){ cout<<s[i]<<'\n'; return 0; } } return 0; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 256 KB | Output is correct |
2 | Correct | 2 ms | 256 KB | Output is correct |
3 | Correct | 2 ms | 300 KB | Output is correct |
4 | Correct | 2 ms | 376 KB | Output is correct |
5 | Correct | 2 ms | 256 KB | Output is correct |
6 | Correct | 2 ms | 256 KB | Output is correct |
7 | Correct | 2 ms | 376 KB | Output is correct |
8 | Correct | 2 ms | 252 KB | Output is correct |
9 | Correct | 2 ms | 376 KB | Output is correct |
10 | Correct | 2 ms | 256 KB | Output is correct |
11 | Correct | 2 ms | 376 KB | Output is correct |
12 | Correct | 2 ms | 256 KB | Output is correct |
13 | Correct | 2 ms | 376 KB | Output is correct |
14 | Correct | 2 ms | 256 KB | Output is correct |
15 | Correct | 2 ms | 376 KB | Output is correct |
16 | Correct | 2 ms | 376 KB | Output is correct |
17 | Correct | 2 ms | 256 KB | Output is correct |
18 | Correct | 2 ms | 376 KB | Output is correct |
19 | Correct | 2 ms | 252 KB | Output is correct |
20 | Correct | 2 ms | 376 KB | Output is correct |
21 | Correct | 2 ms | 376 KB | Output is correct |
22 | Correct | 2 ms | 376 KB | Output is correct |
23 | Correct | 2 ms | 376 KB | Output is correct |
24 | Correct | 2 ms | 256 KB | Output is correct |
25 | Correct | 2 ms | 376 KB | Output is correct |