Submission #14900

# Submission time Handle Problem Language Result Execution time Memory
14900 2015-07-05T14:24:28 Z kyma123 이상한 수열 (OJUZ10_bizarre) C++
0 / 100
266 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;
		cout << a << ' ';
		a += 1000000;
		series[i] = a;
		if(!arr[a])
			s++;
		arr[a]++;
	}
	cin >> m;
	if(m < n) {
		cout << endl << series[m - 1];
		return 0;
	}
	for(i = n; i < m; i++) {
		cout << s << ' ';
		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 0 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 Incorrect 1 ms 9724 KB Output isn't correct
2 Incorrect 1 ms 9724 KB Output isn't correct
3 Incorrect 0 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
6 Incorrect 0 ms 9724 KB Output isn't correct
7 Incorrect 0 ms 9724 KB Output isn't correct
8 Incorrect 0 ms 9724 KB Output isn't correct
9 Incorrect 5 ms 9724 KB Output isn't correct
10 Incorrect 2 ms 9724 KB Output isn't correct
# Verdict Execution time Memory Grader output
1 Incorrect 7 ms 9724 KB Output isn't correct
2 Incorrect 74 ms 9724 KB Output isn't correct
3 Incorrect 48 ms 9724 KB Output isn't correct
4 Incorrect 101 ms 9724 KB Output isn't correct
5 Incorrect 102 ms 9724 KB Output isn't correct
6 Incorrect 85 ms 9724 KB Output isn't correct
7 Incorrect 135 ms 9724 KB Output isn't correct
8 Incorrect 100 ms 9724 KB Output isn't correct
9 Incorrect 21 ms 9724 KB Output isn't correct
10 Incorrect 79 ms 9724 KB Output isn't correct
11 Incorrect 0 ms 9724 KB Output isn't correct
12 Incorrect 169 ms 9724 KB Output isn't correct
13 Incorrect 0 ms 9724 KB Output isn't correct
14 Incorrect 156 ms 9724 KB Output isn't correct
15 Incorrect 89 ms 9724 KB Output isn't correct
# Verdict Execution time Memory Grader output
1 Incorrect 266 ms 9724 KB Output isn't correct
2 Incorrect 171 ms 9724 KB Output isn't correct
3 Incorrect 214 ms 9724 KB Output isn't correct
4 Incorrect 89 ms 9724 KB Output isn't correct
5 Incorrect 27 ms 9724 KB Output isn't correct
6 Incorrect 253 ms 9724 KB Output isn't correct
7 Incorrect 241 ms 9724 KB Output isn't correct
8 Incorrect 163 ms 9724 KB Output isn't correct
9 Incorrect 198 ms 9724 KB Output isn't correct
10 Incorrect 207 ms 9724 KB Output isn't correct
11 Incorrect 180 ms 9724 KB Output isn't correct
12 Incorrect 195 ms 9724 KB Output isn't correct
13 Incorrect 0 ms 9724 KB Output isn't correct
14 Incorrect 197 ms 9724 KB Output isn't correct
15 Incorrect 169 ms 9724 KB Output isn't correct