Submission #111746

#TimeUsernameProblemLanguageResultExecution timeMemory
111746imsifileList of Unique Integers (FXCUP4_unique)C++17
Compilation error
0 ms0 KiB
#include "unique.h" int uc(int l, int r){ if(l>r) return 0; return UniqueCount(l, r); } void PickUnique(int N) { for(int i=1; i<=N; i++){ if(uc(1, i)==uc(1, i-1)+1 && uc(i, N)==uc(i+1, N)+1) Report(i); } }

Compilation message (stderr)

unique.cpp: In function 'void PickUnique(int)':
unique.cpp:8:6: error: ambiguating new declaration of 'void PickUnique(int)'
 void PickUnique(int N) {
      ^~~~~~~~~~
In file included from unique.cpp:1:0:
unique.h:3:18: note: old declaration 'std::vector<int> PickUnique(int)'
 std::vector<int> PickUnique(int N);
                  ^~~~~~~~~~
unique.cpp:10:56: error: 'Report' was not declared in this scope
   if(uc(1, i)==uc(1, i-1)+1 && uc(i, N)==uc(i+1, N)+1) Report(i);
                                                        ^~~~~~
unique.cpp:10:56: note: suggested alternative: 'short'
   if(uc(1, i)==uc(1, i-1)+1 && uc(i, N)==uc(i+1, N)+1) Report(i);
                                                        ^~~~~~
                                                        short