Submission #94128

#TimeUsernameProblemLanguageResultExecution timeMemory
94128farukkastamonudaGo (COCI16_go)C++14
50 / 50
2 ms376 KiB
#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 (stderr)

go.cpp: In function 'int main()':
go.cpp:15:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  scanf("%d",&n);
  ~~~~~^~~~~~~~~
go.cpp:18:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   scanf("%d %d",&a,&b);
   ~~~~~^~~~~~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...