Submission #583994

# Submission time Handle Problem Language Result Execution time Memory
583994 2022-06-26T15:57:37 Z YassineBenYounes Permutation (APIO22_perm) C++17
Compilation error
0 ms 0 KB
#include<bits/stdc++.h>
using namespace std;

vector<int> construct_permutation(long long k){
     k--;
     k--;
     vector<int> v;
     for(int i = k; i >= 0;i--){
        v.pb(i);
     }
     return v;
}

Compilation message

perm.cpp: In function 'std::vector<int> construct_permutation(long long int)':
perm.cpp:9:11: error: 'class std::vector<int>' has no member named 'pb'
    9 |         v.pb(i);
      |           ^~