Submission #44971

#TimeUsernameProblemLanguageResultExecution timeMemory
44971junodeveloperLanguages (IOI10_languages)C++14
Compilation error
0 ms0 KiB
#include "lang.h" #include "grader.h" #include <map> #include <algorithm> using namespace std; typedef unsigned long long ll; map<ll, int> mp[56]; int excerpt(int* a) { int cnt[56] = {0}; for(int i=0; i<96; i++) { ll val = 0; for(int j=0; j<4; j++) val = val * 65535 + a[i] - 1; int mx = 0, idx = 0; for(int j=0; j<56; j++) if(mx < mp[j][val]) mx = mp[j][val], idx = j; cnt[idx]++; } int ret = max_element(cnt, cnt+56) - cnt; int ans = language(ret); for(int i=0; i<96; i++) { ll val = 0; for(int j=0; j<4; j++) val = val * 65535 + a[i] - 1; mp[ans][val]++; } }

Compilation message (stderr)

lang.cpp: In function 'int excerpt(int*)':
lang.cpp:8:5: error: ambiguating new declaration of 'int excerpt(int*)'
 int excerpt(int* a) {
     ^~~~~~~
In file included from lang.cpp:1:0:
lang.h:1:6: note: old declaration 'void excerpt(int*)'
 void excerpt(int *E);
      ^~~~~~~
lang.cpp:28:1: warning: no return statement in function returning non-void [-Wreturn-type]
 }
 ^