답안 #984167

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
984167 2024-05-16T10:55:22 Z vjudge1 순열 (APIO22_perm) C++17
0 / 100
0 ms 348 KB
#include "perm.h"
#include<bits/stdc++.h>
using namespace std;
#define ll long long
vector<int> construct_permutation(long long k)
{
	k--;
	vector<int> v;
	deque<int> tmp;
        deque<int> h;
	int now = 0;
	for (ll i = 0; i <= 60; i++) {
		if ((1ll << i) & k) {
			tmp.push_back(i);
			for (now = now ; now < i; now++) {
				// now++;
				h.push_front(now);
			}
			now++;
		}
        }
	for (auto it : h) {
               tmp.push_front(it);
        }
	for (auto it : tmp) {
		// cout << it << " ";
		v.push_back(it);
	}
	// cout << "\n";
	return v;
}
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 348 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 348 KB Output isn't correct
2 Halted 0 ms 0 KB -