# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
573521 | neonaht | Permutation (APIO22_perm) | C++17 | 2 ms | 340 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include "perm.h"
#include <bits/stdc++.h>
using namespace std;
#define ll long long
const int SZ=207;
int fen[SZ];
void update(int x,int val) {
while(x<SZ) {
fen[x]+=val;
x+=(x&-x);
}
return ;
}
int query(int x) {
int sum(0);
while(x) {
sum+=fen[x];
x-=(x&-x);
}
return sum;
}
std::vector<int> construct_permutation(long long k)
{
for(int i=0;i<SZ;i++) fen[i]=0;
if(k==2) return {0};
--k;
vector <int> res,seq;
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |