Submission #111746

# Submission time Handle Problem Language Result Execution time Memory
111746 2019-05-16T05:55:57 Z imsifile List of Unique Integers (FXCUP4_unique) C++17
Compilation error
0 ms 0 KB
#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

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