Submission #724081

#TimeUsernameProblemLanguageResultExecution timeMemory
724081AlfaGenus순열 (APIO22_perm)C++17
Compilation error
0 ms0 KiB
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
using namespace std;
using namespace __gnu_pbds;

typedef tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update> indexed_set;

#define ll long long
#define str string

#define fastio ios::sync_with_stdio(0), cin.tie(0);
#define fs first
#define ss second
#define endl '\n'
#define all(x) (x).begin(), (x).end()
#define len(x) x.size()

#define ran(value, start, stop, step) for (int value = start; value < stop; value += step)
#define ran1(value, start, stop) ran(value, start, stop, 1)
#define ran2(value, stop) ran(value, 0, stop, 1)

#define print(a)          \
    for (auto &x : a)     \
        cout << x << " "; \
    cout << endl;

#define printmp(a)    \
    for (auto &x : a) \
        cout << x.fs << " " << x.ss << endl;

const ll mod = 1e9 + 7;
const ll INF = LONG_LONG_MAX;
const ll NEG_INF = LONG_LONG_MIN;

void solve()
{
    int q;
    cin>>q;
    for(int i = 0; i < q; i ++){
        int k;
        cin>>k;
        vector<int> a(k);
        for(int j = k - 1; j >= 0; j --)a[k - j - 1] = j;
        print(a)
    }
}

signed main()
{
    fastio int t = 1;
    // cin>>t;
    while (t--)
    {
        solve();
    }
}

Compilation message (stderr)

/usr/bin/ld: /tmp/ccAxm5Qs.o: in function `main':
grader.cpp:(.text.startup+0x0): multiple definition of `main'; /tmp/cc4YD1nt.o:perm.cpp:(.text.startup+0x0): first defined here
/usr/bin/ld: /tmp/ccAxm5Qs.o: in function `main':
grader.cpp:(.text.startup+0x240): undefined reference to `construct_permutation(long long)'
collect2: error: ld returned 1 exit status