Submission #89025

#TimeUsernameProblemLanguageResultExecution timeMemory
89025nikaLuxury burrow (IZhO13_burrow)C++14
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> using namespace std; long long int z[1000][1000],k=9999999999999999999999999,a,b,c,d,e,g=0,h,i; int main() { cin>>a>>b>>c; for(i=1;i<=a;i++){ for(d=1;d<=b;d++){ cin>>z[i][d]; k=min(k,z[i][d]); if((f<=z[i][d]) && (z[i][d]<c) && (g==0)){ f=z[i][d]; } if(z[i][d]>c){ g++; } }} i=1; h=f; if(g==0){ while(f<c){ f=f*i; i++; if(f<c){ f=h; } } cout<<i-1<<" "<<f; return 0; } if(g!=0){ h=k; while(k<c){ k=k*i; i++; if(k<c){ k=h; } } cout<<i-1<<" "<<k; return 0; } return 0; }

Compilation message (stderr)

burrow.cpp:4:31: warning: integer constant is too large for its type
 long long int z[1000][1000],k=9999999999999999999999999,a,b,c,d,e,g=0,h,i;
                               ^~~~~~~~~~~~~~~~~~~~~~~~~
burrow.cpp: In function 'int main()':
burrow.cpp:12:17: error: 'f' was not declared in this scope
             if((f<=z[i][d]) && (z[i][d]<c) && (g==0)){
                 ^
burrow.cpp:20:7: error: 'f' was not declared in this scope
     h=f;
       ^