답안 #843174

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

const int N = 1e6 + 66;

int n, k, v[N], ind = 1;
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=1;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 114 ms 4820 KB Unexpected end of file - int32 expected
2 Incorrect 114 ms 4176 KB Unexpected end of file - int32 expected
3 Incorrect 113 ms 4196 KB Unexpected end of file - int32 expected
4 Incorrect 112 ms 4692 KB Unexpected end of file - int32 expected
5 Incorrect 353 ms 29092 KB Expected EOF
6 Incorrect 175 ms 11476 KB Expected EOF
# 결과 실행 시간 메모리 Grader output
1 Incorrect 116 ms 5344 KB Unexpected end of file - int32 expected
2 Incorrect 115 ms 5320 KB Unexpected end of file - int32 expected
3 Incorrect 112 ms 4436 KB Unexpected end of file - int32 expected
4 Incorrect 603 ms 54148 KB Expected EOF
5 Incorrect 184 ms 11656 KB Expected EOF
6 Incorrect 141 ms 8008 KB Unexpected end of file - int32 expected
7 Incorrect 140 ms 7876 KB Unexpected end of file - int32 expected
8 Incorrect 179 ms 11828 KB Expected EOF
9 Incorrect 91 ms 3664 KB Unexpected end of file - int32 expected
10 Incorrect 176 ms 15436 KB Expected EOF
11 Incorrect 88 ms 6336 KB Unexpected end of file - int32 expected
12 Runtime error 213 ms 262144 KB Execution killed with signal 9
13 Runtime error 191 ms 262144 KB Execution killed with signal 9
14 Runtime error 190 ms 262144 KB Execution killed with signal 9