Submission #14060

# Submission time Handle Problem Language Result Execution time Memory
14060 2015-04-26T02:32:57 Z pl0892029 이상한 수열 (OJUZ10_bizarre) C++
62 / 100
1000 ms 65536 KB
#include <cstdio>
#include <set>

int arr[50505];

int main()
{
	int n, m;
	scanf("%d", &n);
	for (int i = 1; i <= n; ++i)
	{
		scanf("%d", &arr[i]);
	}
	scanf("%d", &m);

	if (m <= n)
	{
		printf("%d", arr[m]);
	}
	else
	{
		std::set<int> nSet;
		for (int i = 1; i <= n; ++i)
		{
			nSet.insert(arr[i]);
		}
		for (int i = n + 1; i < m; ++i)
		{
			nSet.insert(nSet.size());
		}

		printf("%d", nSet.size());
	}
}
# Verdict Execution time Memory Grader output
1 Correct 0 ms 1408 KB Output is correct
2 Correct 0 ms 1408 KB Output is correct
3 Correct 0 ms 1408 KB Output is correct
4 Correct 0 ms 1408 KB Output is correct
5 Correct 0 ms 1408 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 1408 KB Output is correct
2 Correct 0 ms 1408 KB Output is correct
3 Correct 0 ms 1408 KB Output is correct
4 Correct 0 ms 1408 KB Output is correct
5 Correct 0 ms 1408 KB Output is correct
6 Correct 0 ms 1408 KB Output is correct
7 Correct 0 ms 1408 KB Output is correct
8 Correct 0 ms 1408 KB Output is correct
9 Correct 0 ms 1408 KB Output is correct
10 Correct 0 ms 1408 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 1408 KB Output is correct
2 Correct 0 ms 1408 KB Output is correct
3 Correct 8 ms 1804 KB Output is correct
4 Correct 5 ms 1672 KB Output is correct
5 Correct 0 ms 1408 KB Output is correct
6 Correct 8 ms 1936 KB Output is correct
7 Correct 5 ms 1804 KB Output is correct
8 Correct 30 ms 4180 KB Output is correct
9 Correct 15 ms 3388 KB Output is correct
10 Correct 10 ms 2068 KB Output is correct
11 Correct 5 ms 1408 KB Output is correct
12 Correct 0 ms 1408 KB Output is correct
13 Correct 18 ms 4312 KB Output is correct
14 Correct 6 ms 1408 KB Output is correct
15 Correct 38 ms 4972 KB Output is correct
# Verdict Execution time Memory Grader output
1 Memory limit exceeded 768 ms 65536 KB Memory limit exceeded
2 Execution timed out 1000 ms 1800 KB Program timed out
3 Execution timed out 1000 ms 3648 KB Program timed out
4 Execution timed out 1000 ms 1668 KB Program timed out
5 Memory limit exceeded 761 ms 65536 KB Memory limit exceeded
6 Memory limit exceeded 823 ms 65536 KB Memory limit exceeded
7 Memory limit exceeded 784 ms 65536 KB Memory limit exceeded
8 Memory limit exceeded 798 ms 65536 KB Memory limit exceeded
9 Memory limit exceeded 773 ms 65536 KB Memory limit exceeded
10 Memory limit exceeded 723 ms 65536 KB Memory limit exceeded
11 Execution timed out 1000 ms 8928 KB Program timed out
12 Memory limit exceeded 803 ms 65536 KB Memory limit exceeded
13 Execution timed out 1000 ms 3648 KB Program timed out
14 Memory limit exceeded 807 ms 65536 KB Memory limit exceeded
15 Execution timed out 1000 ms 3384 KB Program timed out