Submission #320542

#TimeUsernameProblemLanguageResultExecution timeMemory
320542seedkinList of Unique Integers (FXCUP4_unique)C++17
0 / 100
1 ms492 KiB
#include <stdio.h> #include <stdlib.h> #include "unique.h" int map[205][205]; std::vector<int> PickUnique(int N) { for(int i =0; i< N; i++) { map[0][i] = UniqueCount(0, i); map[i][N-1] = UniqueCount(i, N-1); } std::vector<int> res; for(int i=0 ; i<N ; i++) { if( i > 0 && map[0][i] == map[0][i-1] + 1 ) { if( i < N-1 && map[i][N-1] == map[i+1][N-1] +1) { res.push_back(1); continue; } } res.push_back(0) ; } // for(int i =0; i< N; i++) { // printf("%d ", res[i]); // } return res; }
#Verdict Execution timeMemoryGrader output
Fetching results...