답안 #14332

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
14332 2015-05-12T06:51:07 Z Namnamseo 이상한 수열 (OJUZ10_bizarre) C++
0 / 100
1000 ms 5104 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;
    while(true){
        s.clear();
        scanf("%d",&m);
        if(m<=n){
            printf("%d\n",data[m]);
        } else {
            for(i=1;i<=n;++i) s.insert(data[i]);
            m-=n;
            for(i=1;m && i<=n;++i){
                if(s.find(s.size()) != s.end()){
                    break;
                }
                --m;
                s.insert(s.size());
            }
            printf("%d\n",s.size());
        }
    }
    return 0;
}
# 결과 실행 시간 메모리 Grader output
1 Runtime error 729 ms 1408 KB Program hung waiting for input
2 Runtime error 679 ms 1408 KB Program hung waiting for input
3 Runtime error 699 ms 1408 KB Program hung waiting for input
4 Runtime error 642 ms 1408 KB Program hung waiting for input
5 Runtime error 751 ms 1408 KB Program hung waiting for input
# 결과 실행 시간 메모리 Grader output
1 Runtime error 756 ms 1408 KB Program hung waiting for input
2 Runtime error 588 ms 1408 KB Program hung waiting for input
3 Runtime error 568 ms 1408 KB Program hung waiting for input
4 Runtime error 645 ms 1408 KB Program hung waiting for input
5 Runtime error 672 ms 1408 KB Program hung waiting for input
6 Runtime error 600 ms 1408 KB Program hung waiting for input
7 Runtime error 610 ms 1408 KB Program hung waiting for input
8 Runtime error 600 ms 1408 KB Program hung waiting for input
9 Runtime error 718 ms 1408 KB Program hung waiting for input
10 Runtime error 619 ms 1408 KB Program hung waiting for input
# 결과 실행 시간 메모리 Grader output
1 Runtime error 682 ms 3124 KB Program hung waiting for input
2 Runtime error 598 ms 2596 KB Program hung waiting for input
3 Runtime error 514 ms 1408 KB Program hung waiting for input
4 Runtime error 691 ms 1936 KB Program hung waiting for input
5 Runtime error 652 ms 1804 KB Program hung waiting for input
6 Runtime error 654 ms 1408 KB Program hung waiting for input
7 Runtime error 643 ms 1408 KB Program hung waiting for input
8 Runtime error 759 ms 4180 KB Program hung waiting for input
9 Runtime error 662 ms 1408 KB Program hung waiting for input
10 Runtime error 638 ms 1408 KB Program hung waiting for input
11 Runtime error 789 ms 1672 KB Program hung waiting for input
12 Runtime error 561 ms 1408 KB Program hung waiting for input
13 Runtime error 688 ms 1804 KB Program hung waiting for input
14 Runtime error 539 ms 2068 KB Program hung waiting for input
15 Runtime error 620 ms 4972 KB Program hung waiting for input
# 결과 실행 시간 메모리 Grader output
1 Execution timed out 1000 ms 3652 KB Program timed out
2 Execution timed out 1000 ms 3784 KB Program timed out
3 Execution timed out 1000 ms 1672 KB Program timed out
4 Execution timed out 1000 ms 1804 KB Program timed out
5 Execution timed out 1000 ms 3652 KB Program timed out
6 Execution timed out 1000 ms 3652 KB Program timed out
7 Execution timed out 1000 ms 4312 KB Program timed out
8 Execution timed out 1000 ms 2596 KB Program timed out
9 Execution timed out 1000 ms 5104 KB Program timed out
10 Execution timed out 1000 ms 3388 KB Program timed out
11 Execution timed out 1000 ms 3124 KB Program timed out
12 Runtime error 630 ms 1408 KB Program hung waiting for input
13 Execution timed out 1000 ms 1936 KB Program timed out
14 Execution timed out 1000 ms 3652 KB Program timed out
15 Execution timed out 1000 ms 3256 KB Program timed out