답안 #14335

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
14335 2015-05-12T06:56:11 Z Namnamseo 이상한 수열 (OJUZ10_bizarre) C++
62 / 100
1000 ms 65536 KB
#include <cstdio>
#include <set>

using namespace std;
set<int> s;
int n;
int data[50010];

int main()
{
    scanf("%d",&n);
    int i;
    for(i=1;i<=n;++i) scanf("%d",data+i);
    int m;
    scanf("%d",&m);
    if(m<=n){
        printf("%d\n",data[m]);
    } else {
        for(i=1;i<=n;++i) s.insert(data[i]);
        m-=n+1;
        for(i=1;m;++i){
            if(s.find(s.size()) != s.end()){
                break;
            }
            --m;
            s.insert(s.size());
        }
        printf("%d\n",s.size());
    }
    return 0;
}
# 결과 실행 시간 메모리 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
# 결과 실행 시간 메모리 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
# 결과 실행 시간 메모리 Grader output
1 Correct 9 ms 1408 KB Output is correct
2 Correct 8 ms 1936 KB Output is correct
3 Correct 39 ms 4972 KB Output is correct
4 Correct 0 ms 1408 KB Output is correct
5 Correct 28 ms 4312 KB Output is correct
6 Correct 21 ms 3388 KB Output is correct
7 Correct 11 ms 2068 KB Output is correct
8 Correct 4 ms 1804 KB Output is correct
9 Correct 0 ms 1672 KB Output is correct
10 Correct 0 ms 1408 KB Output is correct
11 Correct 10 ms 1408 KB Output is correct
12 Correct 6 ms 1408 KB Output is correct
13 Correct 0 ms 1408 KB Output is correct
14 Correct 4 ms 1804 KB Output is correct
15 Correct 33 ms 4180 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 25 ms 3388 KB Output is correct
2 Execution timed out 1000 ms 65536 KB Program timed out
3 Execution timed out 1000 ms 65536 KB Program timed out
4 Execution timed out 1000 ms 65536 KB Program timed out
5 Correct 0 ms 1804 KB Output is correct
6 Execution timed out 1000 ms 65536 KB Program timed out
7 Execution timed out 1000 ms 65536 KB Program timed out
8 Execution timed out 1000 ms 65536 KB Program timed out
9 Execution timed out 1000 ms 65536 KB Program timed out
10 Correct 23 ms 3652 KB Output is correct
11 Correct 24 ms 3652 KB Output is correct
12 Execution timed out 1000 ms 65536 KB Program timed out
13 Correct 88 ms 8932 KB Output is correct
14 Execution timed out 1000 ms 65536 KB Program timed out
15 Correct 0 ms 1672 KB Output is correct