제출 #969555

#제출 시각아이디문제언어결과실행 시간메모리
969555Syrius순열 (APIO22_perm)C++17
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h> #include "perm.h" using namespace std; // #define int long long #define ll long long #define ff first #define ss second #define pint pair < int , int > #define fast ios_base::sync_with_stdio(NULL); cin.tie(NULL) // typedef vector < int > vint; const int inf = 1e9 + 9; const int mxn = 2e5 + 2; const int mod = 1e9 + 7; vector < int > contsruct_permutation(long long k) { vint v; int mn = 0 , mx = 0; int kk = k; while (k != 1) { if (k % 2 == 0) k /= 2; else k--; mx++; } k = kk; while (k != 1) { if (k % 2 == 0) { k /= 2; v.push_back(mx); mx--; } else { k--; v.push_back(mn); } } reverse(v.begin() , v.end()); return v; }

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

perm.cpp: In function 'std::vector<int> contsruct_permutation(long long int)':
perm.cpp:19:2: error: 'vint' was not declared in this scope; did you mean 'uint'?
   19 |  vint v;
      |  ^~~~
      |  uint
perm.cpp:32:4: error: 'v' was not declared in this scope
   32 |    v.push_back(mx);
      |    ^
perm.cpp:36:4: error: 'v' was not declared in this scope
   36 |    v.push_back(mn);
      |    ^
perm.cpp:40:10: error: 'v' was not declared in this scope
   40 |  reverse(v.begin() , v.end());
      |          ^