permutation.cpp: In function 'int* conv(std::vector<int>)':
permutation.cpp:24:5: error: non-member 't' cannot be declared 'mutable'
24 | mutable int t=v.size();
| ^~~~~~~
permutation.cpp:25:16: error: storage size of 'ret' isn't constant
25 | static int ret[t];
| ^~~
permutation.cpp:26:18: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
26 | for(int i=0;i<v.size();i++)ret[i]=v[i];
| ~^~~~~~~~~
permutation.cpp: In function 'void solve(int)':
permutation.cpp:62:18: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
62 | for(int i=0;i<v2.size();i++)
| ~^~~~~~~~~~
permutation.cpp:65:22: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
65 | for(int j=i;j<v2.size();j++)v1.push_back(v2[j]);
| ~^~~~~~~~~~
permutation.cpp:72:18: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
72 | for(int i=0;i<v2.size();i++)
| ~^~~~~~~~~~
permutation.cpp:79:18: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
79 | for(int i=2;i<ans.size();i++)
| ~^~~~~~~~~~~
permutation.cpp:89:18: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
89 | for(int i=0;i<ans.size();i++)minans=min(minans,ans[i]);
| ~^~~~~~~~~~~
permutation.cpp:90:18: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
90 | for(int i=0;i<ans.size();i++)
| ~^~~~~~~~~~~
permutation.cpp:107:12: error: cannot convert 'std::vector<int>' to 'int*'
107 | answer(ans);
| ^~~
| |
| std::vector<int>
In file included from permutation.cpp:1:
permutationc.h:3:17: note: initializing argument 1 of 'void answer(int*)'
3 | void answer(int v[]);
| ~~~~^~~
stub.cpp: In function 'int query(int*)':
stub.cpp:15:9: warning: ignoring return value of 'int fscanf(FILE*, const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
15 | fscanf(stdin, "%d", &x);
| ~~~~~~^~~~~~~~~~~~~~~~~
stub.cpp: In function 'int main(int, char**)':
stub.cpp:48:9: warning: ignoring return value of 'int fscanf(FILE*, const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
48 | fscanf(stdin, "%d", &N);
| ~~~~~~^~~~~~~~~~~~~~~~~