# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
586533 | jamezzz | 순열 (APIO22_perm) | C++17 | 10 ms | 348 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "perm.h"
#include <bits/stdc++.h>
using namespace std;
#define all(x) x.begin(),x.end()
#define pb push_back
typedef long long ll;
vector<int> construct_permutation(ll k){
vector<int> b4;
while(k){
b4.pb((int)(k%4));
k/=4;
}
vector<double> ans;
if(b4.back()==2)ans.pb(0);
else if(b4.back()==3)ans.pb(1),ans.pb(0);
b4.pop_back();
while(!b4.empty()){
if(b4.back()==0)ans.pb(1e9),ans.pb(1e9+1);
else if(b4.back()==1)ans.pb(1e9),ans.pb(1e9+1),ans.pb(-1);
else if(b4.back()==2)ans.pb(1e9),ans.pb(-1),ans.pb(1e9+1);
else{
int p0=-1,p1=1e9;
for(int i=0;i<ans.size();++i){
if(ans[i]==0)p0=i;
if(ans[i]==1)p1=i;
}
컴파일 시 표준 에러 (stderr) 메시지
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |