Submission #984165

# Submission time Handle Problem Language Result Execution time Memory
984165 2024-05-16T10:54:12 Z vjudge1 Permutation (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(now + i + 1);
			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;
}
# 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 -