Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); i++)
#define ALL(v) (v).begin(), (v).end()
using ll = long long;
using P = pair<int, int>;
constexpr int INF = 1e9;
constexpr long long LINF = 1e18;
constexpr long long MOD = 1e9 + 7;

signed main() {
    int n, a, b;
    cin >> n >> a >> b;
    /*
    if (n + 1 < a + b) {
        cout << -1 << endl;
        return 0;
    }
    */
    bool flag = false;
    if ((n + 1) / 2 < a) {
        swap(a, b);
        if(#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); i++)
#define ALL(v) (v).begin(), (v).end()
using ll = long long;
using P = pair<int, int>;
constexpr int INF = 1e9;
constexpr long long LINF = 1e18;
constexpr long long MOD = 1e9 + 7;

signed main() {
    int n, a, b;
    cin >> n >> a >> b;
    /*
    if (n + 1 < a + b) {
        cout << -1 << endl;
        return 0;
    }
    */
    bool flag = false;
    if ((n + 1) / 2 < a) {
        swap(a, b);
        if ((n + 1) / 2 < a){
            cout << -1 << endl;
            return 0;
        }
        flag = true;
    }
    int ans[n] = {};
    int t = a;
    rep(i, a) {
        ans[i * 2] = t;
        t--;
    }
    t = n - b + 2;
    rep(i, n) {
        if (ans[i] == 0) {
            ans[i] = t;
            t++;
            if (t > n) goto fin;
        }
    }
fin:;
    reverse(ans, ans + n);
    t = n - b + 1;
    rep(i, n) {
        if (ans[i] == 0) {
            ans[i] = t;
            t--;
        }
    }
    if (flag) {
        swap(a, b);
        reverse(ans, ans + n);
    }
    bool used[n + 1] = {};
    rep(i, n) {
        if (used[ans[i]] || ans[i] < 1 || n < ans[i]) {
            cout << -1 << endl;
            return 0;
        }
        used[ans[i]] = true;
    }
    int dp[n + 1];
    fill(dp, dp + n + 1, INF);
    rep(i, n) {
        *lower_bound(dp, dp + n + 1, ans[i]) = ans[i];
    }
    if (a != lower_bound(dp, dp + n + 1, INF) - dp) {
        cout << -1 << endl;
        return 0;
    }
    reverse(ans, ans + n);
    fill(dp, dp + n + 1, INF);
    rep(i, n) {
        *lower_bound(dp, dp + n + 1, ans[i]) = ans[i];
    }
    if (b != lower_bound(dp, dp + n + 1, INF) - dp) {
        cout << -1 << endl;
        return 0;
    }
    reverse(ans, ans + n);
    rep(i, n) {
        if (i) cout << " ";
        cout << ans[i];
    }
    cout << endl;
    return 0;
})
        flag = true;
    }
    int ans[n] = {};
    int t = a;
    rep(i, a) {
        ans[i * 2] = t;
        t--;
    }
    t = n - b + 2;
    rep(i, n) {
        if (ans[i] == 0) {
            ans[i] = t;
            t++;
            if (t > n) goto fin;
        }
    }
fin:;
    reverse(ans, ans + n);
    t = n - b + 1;
    rep(i, n) {
        if (ans[i] == 0) {
            ans[i] = t;
            t--;
        }
    }
    if (flag) {
        swap(a, b);
        reverse(ans, ans + n);
    }
    bool used[n + 1] = {};
    rep(i, n) {
        if (used[ans[i]] || ans[i] < 1 || n < ans[i]) {
            cout << -1 << endl;
            return 0;
        }
        used[ans[i]] = true;
    }
    int dp[n + 1];
    fill(dp, dp + n + 1, INF);
    rep(i, n) {
        *lower_bound(dp, dp + n + 1, ans[i]) = ans[i];
    }
    if (a != lower_bound(dp, dp + n + 1, INF) - dp) {
        cout << -1 << endl;
        return 0;
    }
    reverse(ans, ans + n);
    fill(dp, dp + n + 1, INF);
    rep(i, n) {
        *lower_bound(dp, dp + n + 1, ans[i]) = ans[i];
    }
    if (b != lower_bound(dp, dp + n + 1, INF) - dp) {
        cout << -1 << endl;
        return 0;
    }
    reverse(ans, ans + n);
    rep(i, n) {
        if (i) cout << " ";
        cout << ans[i];
    }
    cout << endl;
    return 0;
}

Compiler output:
a.cc:23:12: error: stray '#' in program
   23 |         if(#include <bits/stdc++.h>
      |            ^
a.cc: In function 'int main()':
a.cc:23:13: error: 'include' was not declared in this scope
   23 |         if(#include <bits/stdc++.h>
      |             ^~~~~~~
a.cc:23:22: error: 'bits' was not declared in this scope
   23 |         if(#include <bits/stdc++.h>
      |                      ^~~~
a.cc:23:27: error: 'stdc' was not declared in this scope; did you mean 'std'?
   23 |         if(#include <bits/stdc++.h>
      |                           ^~~~
      |                           std
a.cc:24:1: error: expected primary-expression before 'using'
   24 | using namespace std;
      | ^~~~~
a.cc:27:1: error: expected primary-expression before 'using'
   27 | using ll = long long;
      | ^~~~~
a.cc:24:21: error: expected ')' before 'using'
   24 | using namespace std;
      |                     ^
      |                     )
......
   27 | using ll = long long;
      | ~~~~~                
a.cc:23:11: note: to match this '('
   23 |         if(#include <bits/stdc++.h>
      |           ^
a.cc:33:12: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
   33 | signed main() {
      |            ^~
a.cc:33:12: note: remove parentheses to default-initialize a variable
   33 | signed main() {
      |            ^~
      |            --
a.cc:33:12: note: or replace parentheses with braces to value-initialize a variable
a.cc:33:15: error: a function-definition is not allowed here before '{' token
   33 | signed main() {
      |               ^
a.cc:111:2: error: expected primary-expression before ')' token
  111 | })
      |  ^