Submission #14905

# Submission time Handle Problem Language Result Execution time Memory
14905 2015-07-05T14:29:59 Z kyma123 이상한 수열 (OJUZ10_bizarre) C++
24 / 100
32 ms 9724 KB
#include <iostream>
using namespace std;

int arr[2000002], s, series[50001];

int main() {
	int n, m, a, i;
	cin >> n;
	for(i = 0; i < n; i++) {
		cin >> a;
		a += 1000000;
		series[i] = a;
		if(!arr[a])
			s++;
		arr[a]++;
	}
	cin >> m;
	if(m <= n) {
		cout << series[m - 1];
		return 0;
	}
	for(i = n; i < m; i++) {
		if(arr[s + 1000000]) {
			break;
		}
		s++;
	}
	cout << s - (i == m);
}
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 9724 KB Output isn't correct
2 Incorrect 0 ms 9724 KB Output isn't correct
3 Incorrect 2 ms 9724 KB Output isn't correct
4 Incorrect 0 ms 9724 KB Output isn't correct
5 Incorrect 0 ms 9724 KB Output isn't correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 9724 KB Output is correct
2 Correct 0 ms 9724 KB Output is correct
3 Correct 0 ms 9724 KB Output is correct
4 Correct 0 ms 9724 KB Output is correct
5 Correct 0 ms 9724 KB Output is correct
6 Correct 1 ms 9724 KB Output is correct
7 Correct 0 ms 9724 KB Output is correct
8 Correct 0 ms 9724 KB Output is correct
9 Correct 0 ms 9724 KB Output is correct
10 Correct 0 ms 9724 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 7 ms 9724 KB Output is correct
2 Correct 15 ms 9724 KB Output is correct
3 Correct 23 ms 9724 KB Output is correct
4 Correct 8 ms 9724 KB Output is correct
5 Incorrect 15 ms 9724 KB Output isn't correct
6 Incorrect 21 ms 9724 KB Output isn't correct
7 Correct 6 ms 9724 KB Output is correct
8 Incorrect 24 ms 9724 KB Output isn't correct
9 Correct 0 ms 9724 KB Output is correct
10 Incorrect 4 ms 9724 KB Output isn't correct
11 Correct 7 ms 9724 KB Output is correct
12 Incorrect 30 ms 9724 KB Output isn't correct
13 Correct 5 ms 9724 KB Output is correct
14 Correct 13 ms 9724 KB Output is correct
15 Incorrect 15 ms 9724 KB Output isn't correct
# Verdict Execution time Memory Grader output
1 Correct 5 ms 9724 KB Output is correct
2 Correct 24 ms 9724 KB Output is correct
3 Incorrect 9 ms 9724 KB Output isn't correct
4 Incorrect 16 ms 9724 KB Output isn't correct
5 Incorrect 11 ms 9724 KB Output isn't correct
6 Incorrect 9 ms 9724 KB Output isn't correct
7 Incorrect 17 ms 9724 KB Output isn't correct
8 Correct 3 ms 9724 KB Output is correct
9 Correct 0 ms 9724 KB Output is correct
10 Incorrect 24 ms 9724 KB Output isn't correct
11 Incorrect 16 ms 9724 KB Output isn't correct
12 Correct 19 ms 9724 KB Output is correct
13 Incorrect 12 ms 9724 KB Output isn't correct
14 Incorrect 3 ms 9724 KB Output isn't correct
15 Correct 32 ms 9724 KB Output is correct