permutation.cpp:22:4: warning: structured bindings only available with '-std=c++17' or '-std=gnu++17'
22 | int[] conv(vector<int>v)
| ^
permutation.cpp:22:4: error: structured binding declaration cannot have type 'int'
22 | int[] conv(vector<int>v)
| ^~
permutation.cpp:22:4: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
permutation.cpp:22:4: error: empty structured binding declaration
permutation.cpp:22:7: error: expected initializer before 'conv'
22 | int[] conv(vector<int>v)
| ^~~~
permutation.cpp: In function 'void solve(int)':
permutation.cpp:40:29: 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:46:33: error: 'conv' was not declared in this scope; did you mean 'lconv'?
46 | answers.push_back(query(conv(v1)));
| ^~~~
| lconv
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:66:33: error: 'conv' was not declared in this scope; did you mean 'lconv'?
66 | answers.push_back(query(conv(v1)));
| ^~~~
| lconv
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);
| ~~~~~~^~~~~~~~~~~~~~~~~