Submission #632301

#TimeUsernameProblemLanguageResultExecution timeMemory
632301ggohLanguages (IOI10_languages)C++14
0 / 100
2952 ms3004 KiB
#include<bits/stdc++.h> #include "grader.h" using namespace std; int V[56][65536]; void excerpt(int *E) { int l=0,maxi=-1,maxind; int e[65536]={}; for(int i=0;i<100;i++) { e[E[i]]++; if(e[E[i]]>maxi) { maxi=e[E[i]]; maxind=E[i]; } } for(int j=0;j<56;j++) { maxi=-1; int maxj; for(int i=1;i<65536;i++) { if(V[j][i]>maxi) { maxi=V[j][i]; maxj=i; } } if(maxj==maxind) { l=j; break; } } int L=language(l); for(int i=0;i<100;i++) { V[L][E[i]]++; } }

Compilation message (stderr)

lang.cpp: In function 'void excerpt(int*)':
lang.cpp:31:5: warning: 'maxj' may be used uninitialized in this function [-Wmaybe-uninitialized]
   31 |     if(maxj==maxind)
      |     ^~
lang.cpp:31:5: warning: 'maxind' may be used uninitialized in this function [-Wmaybe-uninitialized]
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...