Submission #980600

#TimeUsernameProblemLanguageResultExecution timeMemory
980600NexusSequence (APIO23_sequence)C++17
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> #define ll long long using namespace std; const ll N=1e6+9,M=2e18+9,mod=1e9+7; ll a[66],q,k,x,y,z; vector<int>v; ll pow(ll X,ll Y) { if(!Y)return 1; if(Y&1)return X*pow(X,Y-1); ll ret=pow(X,Y/1); return ret*ret; } vector<int>construct_permutation(ll k) { x=(ll)log2(k); v.clear(); y=x-1; k-=(ll)pow(2,x); for(ll i=62;i>=0;--i) { if(k>=(ll)pow(2,i))k-=(ll)pow(2,i),a[i]=1,++y;else a[i]=0; } for(ll i=0;i<x;++i) { if(a[i])v.push_back((ll)y),--y; v.push_back((ll)i); } return v; }

Compilation message (stderr)

/usr/bin/ld: /tmp/cc8aE8x1.o: in function `main':
grader.cpp:(.text.startup+0x2a4): undefined reference to `sequence(int, std::vector<int, std::allocator<int> >)'
collect2: error: ld returned 1 exit status