Submission #148698

#TimeUsernameProblemLanguageResultExecution timeMemory
148698Avengers (#200)List of Unique Integers (FXCUP4_unique)C++17
0 / 100
5 ms256 KiB
#include <bits/stdc++.h> #define fr(i, n, m) for(int i = (n); i < (m); i ++) #define pb push_back #define st first #define nd second #define pq priority_queue #define all(x) begin(x),end(x) using namespace std; typedef long long ll; typedef long double ld; typedef pair<int,int> pii; ll const inf = 1e9; ll const mod = 1e9 + 7; ld const eps = 1e-9; #include "unique.h" std::vector<int> PickUnique(int N) { int l = UniqueCount(0, N - 1); int r = 0; vector <int> ret(N); fr(i, 0, N){ int nl = 0; if(i < N - 1) nl = UniqueCount(0, N - 2 - i); int nr = UniqueCount(N - 1 - i, N - i); if(nl == l - 1 && nr == r + 1){ ret[N - 1 - i] = 1; } else{ ret[N - 1 - i] = 0; } } return ret; }
#Verdict Execution timeMemoryGrader output
Fetching results...