# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
14299 |
2015-05-10T10:45:56 Z |
jalmal |
이상한 수열 (OJUZ10_bizarre) |
C++ |
|
14 ms |
12996 KB |
#include <stdio.h>
int N, M, inp[50005], chk[3000010], cnt;
int main()
{
//freopen("input.txt", "r", stdin);
int i, j;
scanf("%d", &N);
for(i = 1; i <= N; i ++)
{
scanf("%d", &inp[i]);
if(!chk[inp[i] + 1000000]) cnt ++, chk[inp[i] + 1000000] = 1;
}
scanf("%d", &M);
if(M <= N)
{
printf("%d\n", inp[M]);
return 0;
}
for(i = N+1; i <= M; i ++)
{
if(chk[cnt + 1000000])
{
printf("%d\n", cnt);
return 0;
}
chk[cnt + 1000000] = 1;
cnt ++;
}
printf("%d\n", --cnt);
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
12996 KB |
Output is correct |
2 |
Correct |
0 ms |
12996 KB |
Output is correct |
3 |
Correct |
0 ms |
12996 KB |
Output is correct |
4 |
Correct |
0 ms |
12996 KB |
Output is correct |
5 |
Correct |
0 ms |
12996 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
12996 KB |
Output is correct |
2 |
Correct |
0 ms |
12996 KB |
Output is correct |
3 |
Correct |
0 ms |
12996 KB |
Output is correct |
4 |
Correct |
0 ms |
12996 KB |
Output is correct |
5 |
Correct |
0 ms |
12996 KB |
Output is correct |
6 |
Correct |
0 ms |
12996 KB |
Output is correct |
7 |
Correct |
0 ms |
12996 KB |
Output is correct |
8 |
Correct |
0 ms |
12996 KB |
Output is correct |
9 |
Correct |
0 ms |
12996 KB |
Output is correct |
10 |
Correct |
0 ms |
12996 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
12996 KB |
Output is correct |
2 |
Correct |
0 ms |
12996 KB |
Output is correct |
3 |
Correct |
4 ms |
12996 KB |
Output is correct |
4 |
Correct |
8 ms |
12996 KB |
Output is correct |
5 |
Correct |
5 ms |
12996 KB |
Output is correct |
6 |
Correct |
0 ms |
12996 KB |
Output is correct |
7 |
Correct |
3 ms |
12996 KB |
Output is correct |
8 |
Correct |
0 ms |
12996 KB |
Output is correct |
9 |
Correct |
5 ms |
12996 KB |
Output is correct |
10 |
Correct |
2 ms |
12996 KB |
Output is correct |
11 |
Correct |
3 ms |
12996 KB |
Output is correct |
12 |
Correct |
11 ms |
12996 KB |
Output is correct |
13 |
Correct |
6 ms |
12996 KB |
Output is correct |
14 |
Correct |
11 ms |
12996 KB |
Output is correct |
15 |
Correct |
10 ms |
12996 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
9 ms |
12996 KB |
Output isn't correct |
2 |
Incorrect |
6 ms |
12996 KB |
Output isn't correct |
3 |
Correct |
10 ms |
12996 KB |
Output is correct |
4 |
Incorrect |
14 ms |
12996 KB |
Output isn't correct |
5 |
Incorrect |
4 ms |
12996 KB |
Output isn't correct |
6 |
Correct |
1 ms |
12996 KB |
Output is correct |
7 |
Incorrect |
11 ms |
12996 KB |
Output isn't correct |
8 |
Correct |
10 ms |
12996 KB |
Output is correct |
9 |
Incorrect |
11 ms |
12996 KB |
Output isn't correct |
10 |
Correct |
7 ms |
12996 KB |
Output is correct |
11 |
Incorrect |
9 ms |
12996 KB |
Output isn't correct |
12 |
Correct |
0 ms |
12996 KB |
Output is correct |
13 |
Incorrect |
6 ms |
12996 KB |
Output isn't correct |
14 |
Correct |
0 ms |
12996 KB |
Output is correct |
15 |
Incorrect |
8 ms |
12996 KB |
Output isn't correct |