#include <bits/stdc++.h>
using namespace std;
#define F first
#define S second
using ll = long long;
const int INF = 1e9 + 7;
const int MOD = 998244353;
vector<int> construct_permutation(ll k)
{
vector<int> ans;
int a = 0, b = -1;
bool o = 0;
for (int i = 63; i >= 0; i--)
{
if ((k & (1ll << i)) && !o)
{
o = 1;
continue;
}
if (!o)
continue;
ans.push_back(a);
a++;
if (k & (1ll << i))
{
ans.push_back(b);
b--;
}
}
for (int &i : ans)
i += -b;
return ans;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
348 KB |
Integer 2 violates the range [0, 1] |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
348 KB |
Integer 2 violates the range [0, 1] |
2 |
Halted |
0 ms |
0 KB |
- |