제출 #984162

#제출 시각아이디문제언어결과실행 시간메모리
984162vjudge1순열 (APIO22_perm)C++17
컴파일 에러
0 ms0 KiB
#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 j : h) tmp.push_front(j); } for (auto it : h) { tmp.push_front(it); } for (auto it : tmp) { // cout << it << " "; v.push_back(it); } // cout << "\n"; return v; }

컴파일 시 표준 에러 (stderr) 메시지

perm.cpp: In function 'std::vector<int> construct_permutation(long long int)':
perm.cpp:32:1: error: expected '}' at end of input
   32 | }
      | ^
perm.cpp:6:1: note: to match this '{'
    6 | {
      | ^
perm.cpp:9:13: warning: control reaches end of non-void function [-Wreturn-type]
    9 |  deque<int> tmp;
      |             ^~~