permutation.cpp: In function 'void solve(int)':
permutation.cpp:34:29: error: cannot convert 'std::vector<int>' to 'int*'
34 | answers.push_back(query(v1));
| ^~
| |
| std::vector<int>
In file included from permutation.cpp:1:
permutationc.h:2:15: note: initializing argument 1 of 'int query(int*)'
2 | int query(int v[]);
| ~~~~^~~
permutation.cpp:40:33: error: cannot convert 'std::vector<int>' to 'int*'
40 | answers.push_back(query(v1));
| ^~
| |
| std::vector<int>
In file included from permutation.cpp:1:
permutationc.h:2:15: note: initializing argument 1 of 'int query(int*)'
2 | int query(int v[]);
| ~~~~^~~
permutation.cpp:55:18: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
55 | for(int i=0;i<v2.size();i++)
| ~^~~~~~~~~~
permutation.cpp:58:22: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
58 | for(int j=i;j<v2.size();j++)v1.push_back(v2[j]);
| ~^~~~~~~~~~
permutation.cpp:60:33: error: cannot convert 'std::vector<int>' to 'int*'
60 | answers.push_back(query(v1));
| ^~
| |
| std::vector<int>
In file included from permutation.cpp:1:
permutationc.h:2:15: note: initializing argument 1 of 'int query(int*)'
2 | int query(int v[]);
| ~~~~^~~
permutation.cpp:65:18: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
65 | for(int i=0;i<v2.size();i++)
| ~^~~~~~~~~~
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=2;i<ans.size();i++)
| ~^~~~~~~~~~~
permutation.cpp:82:18: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
82 | for(int i=0;i<ans.size();i++)minans=min(minans,ans[i]);
| ~^~~~~~~~~~~
permutation.cpp:83:18: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
83 | for(int i=0;i<ans.size();i++)
| ~^~~~~~~~~~~
permutation.cpp:100:12: error: cannot convert 'std::vector<int>' to 'int*'
100 | 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);
| ~~~~~~^~~~~~~~~~~~~~~~~