Submission #149143

# Submission time Handle Problem Language Result Execution time Memory
149143 2019-09-01T05:49:19 Z TLEWA맞(#3625, H_Squad, sungjune222, str0ct) List of Unique Integers (FXCUP4_unique) C++17
0 / 100
5 ms 256 KB
#include "unique.h"
#include <bits/stdc++.h>
using namespace std;
vector<int> arr;
int ldp[203],rdp[203];
std::vector<int> PickUnique(int n) 
{
	for(int i=0;i<n;i++)
	{
		ldp[i]=UniqueCount(0,i);
		rdp[i]=UniqueCount(i,n-1);
	} if(ldp[n-1]-ldp[n-2]==1) arr[n-1]=1;
	if(rdp[0]-rdp[1]==1) arr[0]=1; 
	for(int i=1;i<n-1;i++)
	{
		if(ldp[i]-ldp[i-1]==1&&rdp[i]-rdp[i+1]==1) arr[i]=1;
	} return arr;
}  
# Verdict Execution time Memory Grader output
1 Incorrect 5 ms 256 KB Wrong
2 Halted 0 ms 0 KB -