# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
591758 | keta_tsimakuridze | 순열 (APIO22_perm) | C++17 | 2 ms | 340 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "perm.h"
#include<bits/stdc++.h>
#define ll long long
using namespace std;
vector<int> x;
map<int,int> id;
/*
5
100000000000000
*/
void add(int a) {
x.push_back(a);
id[a] = (int)x.size() - 1;
}
std::vector<int> construct_permutation(long long k)
{
x.clear();
int l = 0, r = -1;
int b = 0;
for(int i = 0; i < 60; i++) if(k & (1ll << i)) b = i;
--b;
// cout << b << endl;
for(int i = b; i >= 1; i -= 2) {
ll b1 = k & (1ll << i);
ll b2 = k & (1ll << (i - 1));
if(!b1 && !b2) {
add(++r);
add(++r);
continue;
}
컴파일 시 표준 에러 (stderr) 메시지
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |