답안 #843173

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
843173 2023-09-03T18:39:06 Z Elvin_Fritl Zalmoxis (BOI18_zalmoxis) C++17
0 / 100
1000 ms 262144 KB
#include <bits/stdc++.h>
using namespace std;

const int N = 1e6 + 66;

int n, k, v[N], ind = 0;
vector<int> res;

void func(int x){
    if(ind > x || v[ind] > x)
    {
        res.push_back(x);
        return;
    }
    if(v[ind] == x)
    {
        ind++;
        res.push_back(x);
        return;
    }

    func(x - 1);
    func(x - 1);
}

int32_t main()
{
    int n,k;
	cin>>n>>k;
	for(int i=0;i<n;i++){
		cin>>v[i];
	}
	func(30);
	for(auto &i:res){
        cout<<i<<" ";
	}


}
/*

1 1    2 2    3 3    4 4
1


*/
# 결과 실행 시간 메모리 Grader output
1 Incorrect 119 ms 7116 KB Unexpected end of file - int32 expected
2 Incorrect 111 ms 5964 KB Unexpected end of file - int32 expected
3 Incorrect 113 ms 6228 KB Unexpected end of file - int32 expected
4 Incorrect 113 ms 6856 KB Unexpected end of file - int32 expected
5 Incorrect 350 ms 31132 KB Expected EOF
6 Incorrect 172 ms 13492 KB Expected EOF
# 결과 실행 시간 메모리 Grader output
1 Incorrect 115 ms 6604 KB Unexpected end of file - int32 expected
2 Incorrect 129 ms 7872 KB Unexpected end of file - int32 expected
3 Incorrect 115 ms 6864 KB Unexpected end of file - int32 expected
4 Execution timed out 1010 ms 103084 KB Time limit exceeded
5 Incorrect 232 ms 18860 KB Expected EOF
6 Incorrect 145 ms 9664 KB Unexpected end of file - int32 expected
7 Incorrect 142 ms 9904 KB Unexpected end of file - int32 expected
8 Incorrect 146 ms 10036 KB Unexpected end of file - int32 expected
9 Incorrect 92 ms 5324 KB Unexpected end of file - int32 expected
10 Incorrect 165 ms 15812 KB Expected EOF
11 Incorrect 87 ms 7364 KB Unexpected end of file - int32 expected
12 Runtime error 193 ms 262144 KB Execution killed with signal 9
13 Runtime error 193 ms 262144 KB Execution killed with signal 9
14 Runtime error 195 ms 262144 KB Execution killed with signal 9