Submission #165563

#TimeUsernameProblemLanguageResultExecution timeMemory
165563itiamGo (COCI16_go)C++11
50 / 50
3 ms396 KiB
#include <iostream> #include <algorithm> #include <cstdio> using namespace std; int main(){ int N,x,y,z,Le[73],m,mi=0,uk=0; string A,Ls[73]; cin >> N; for (int i=0;i<N;i++){ z=0; cin >> A; cin >> x >> y; while (y>=x){ y-=x; z+=1; y+=2; } //cout << "z " << z << "\n"; uk+=z; if (i==0){ m=z; } else { if (z>m){ m=z; mi=i; } } Le[i]=z; Ls[i]=A; } cout << uk << "\n" << Ls[mi]; return 0; }

Compilation message (stderr)

go.cpp: In function 'int main()':
go.cpp:8:17: warning: variable 'Le' set but not used [-Wunused-but-set-variable]
     int N,x,y,z,Le[73],m,mi=0,uk=0;
                 ^~
#Verdict Execution timeMemoryGrader output
Fetching results...