permutation.cpp: In function 'int* conv(std::vector<int>)':
permutation.cpp:25:18: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
25 | for(int i=0;i<v.size();i++)ret[i]=v[i];
| ~^~~~~~~~~
permutation.cpp:26:12: warning: address of local variable 'ret' returned [-Wreturn-local-addr]
26 | return ret;
| ^~~
permutation.cpp:24:9: note: declared here
24 | int ret[v.size()];
| ^~~
permutation.cpp: In function 'void solve(int)':
permutation.cpp:61:18: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
61 | for(int i=0;i<v2.size();i++)
| ~^~~~~~~~~~
permutation.cpp:64:22: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
64 | for(int j=i;j<v2.size();j++)v1.push_back(v2[j]);
| ~^~~~~~~~~~
permutation.cpp:71:18: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
71 | for(int i=0;i<v2.size();i++)
| ~^~~~~~~~~~
permutation.cpp:78:18: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
78 | for(int i=2;i<ans.size();i++)
| ~^~~~~~~~~~~
permutation.cpp:88:18: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
88 | for(int i=0;i<ans.size();i++)minans=min(minans,ans[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++)
| ~^~~~~~~~~~~
permutation.cpp:106:12: error: cannot convert 'std::vector<int>' to 'int*'
106 | 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);
| ~~~~~~^~~~~~~~~~~~~~~~~