Submission #148451

# Submission time Handle Problem Language Result Execution time Memory
148451 2019-09-01T04:25:44 Z お前はもう死んでいる(#3784, kuroni, nvmdava, tfg) List of Unique Integers (FXCUP4_unique) C++17
35 / 100
6 ms 640 KB
#include "unique.h"
#include <bits/stdc++.h>
using namespace std;

vector<int> res;
int ans[204][204];

int get(int l, int r){
	if(l > r) return 0;
	return ans[l][r];
}

vector<int> PickUnique(int N) {
	for(int i = 0; i < N; i++){
		for(int j = i; j < N; j++){
			ans[i][j] = UniqueCount(i, j);
		}
	}
	res = std::vector<int>(N, 0);
	for(int i = 0; i < N; i++){
		if(get(0, i - 1) + 1 == get(0, i) && get(i, N - 1) == get(i + 1, N - 1) + 1)
			res[i] = 1;
	}
	return res;
}
# Verdict Execution time Memory Grader output
1 Correct 6 ms 384 KB Correct : C = 3
2 Correct 5 ms 256 KB Correct : C = 15
3 Correct 6 ms 384 KB Correct : C = 325
4 Partially correct 6 ms 384 KB Partially correct : C = 1275
5 Partially correct 6 ms 384 KB Partially correct : C = 1275
6 Partially correct 5 ms 512 KB Partially correct : C = 3003
7 Partially correct 6 ms 512 KB Partially correct : C = 5050
8 Partially correct 6 ms 640 KB Partially correct : C = 11325
9 Partially correct 6 ms 640 KB Partially correct : C = 15931
10 Partially correct 6 ms 640 KB Partially correct : C = 20100
11 Partially correct 5 ms 640 KB Partially correct : C = 20100
12 Partially correct 5 ms 640 KB Partially correct : C = 20100
13 Partially correct 6 ms 640 KB Partially correct : C = 20100
14 Partially correct 6 ms 640 KB Partially correct : C = 20100
15 Partially correct 5 ms 640 KB Partially correct : C = 20100