answer.code:32:14: error: variable or field ‘solve’ declared void
32 | void solve(span<int> vec,int d,vi &cnt,int m,F &&f,Cmp &&cmp) {
| ^~~~~
answer.code:32:20: error: ‘span’ was not declared in this scope
32 | void solve(span<int> vec,int d,vi &cnt,int m,F &&f,Cmp &&cmp) {
| ^~~~
answer.code:32:20: note: ‘std::span’ is only available from C++20 onwards
answer.code:32:25: error: expected primary-expression before ‘int’
32 | void solve(span<int> vec,int d,vi &cnt,int m,F &&f,Cmp &&cmp) {
| ^~~
answer.code:32:34: error: expected primary-expression before ‘int’
32 | void solve(span<int> vec,int d,vi &cnt,int m,F &&f,Cmp &&cmp) {
| ^~~
answer.code:32:43: error: expected primary-expression before ‘&’ token
32 | void solve(span<int> vec,int d,vi &cnt,int m,F &&f,Cmp &&cmp) {
| ^
answer.code:32:44: error: ‘cnt’ was not declared in this scope; did you mean ‘int’?
32 | void solve(span<int> vec,int d,vi &cnt,int m,F &&f,Cmp &&cmp) {
| ^~~
| int
answer.code:32:48: error: expected primary-expression before ‘int’
32 | void solve(span<int> vec,int d,vi &cnt,int m,F &&f,Cmp &&cmp) {
| ^~~
answer.code:32:56: error: expected primary-expression before ‘&&’ token
32 | void solve(span<int> vec,int d,vi &cnt,int m,F &&f,Cmp &&cmp) {
| ^~
answer.code:32:58: error: ‘f’ was not declared in this scope
32 | void solve(span<int> vec,int d,vi &cnt,int m,F &&f,Cmp &&cmp) {
| ^
answer.code:32:64: error: expected primary-expression before ‘&&’ token
32 | void solve(span<int> vec,int d,vi &cnt,int m,F &&f,Cmp &&cmp) {
| ^~
answer.code:32:66: error: ‘cmp’ was not declared in this scope; did you mean ‘Cmp’?
32 | void solve(span<int> vec,int d,vi &cnt,int m,F &&f,Cmp &&cmp) {
| ^~~
| Cmp
answer.code: In function ‘void jhsy::main()’:
answer.code:78:31: error: ‘span’ has not been declared
78 | solve(n,D,[&](span<int> vec,const vi &cnt) {
| ^~~~
answer.code:78:35: error: expected ‘,’ or ‘...’ before ‘<’ token
78 | solve(n,D,[&](span<int> vec,const vi &cnt) {
| ^
answer.code: In lambda function:
answer.code:80:37: error: ‘vec’ was not declared in this scope
80 | for (auto x:vec) {
| ^~~
answer.code:81:38: error: ‘cnt’ was not declared in this scope; did you mean ‘int’?
81 | if (!cnt[x]) {
| ^~~
| int
answer.code:84:37: error: ‘cnt’ was not declared in this scope; did you mean ‘int’?
84 | if (cnt[x] == D-1) {
| ^~~
| int
answer.code: In instantiation of ‘void jhsy::solve(int, int, F&&, Cmp&&) [with F = main()::<lambda(int)>; Cmp = main()::<lambda(int)>]’:
answer.code:78:8: required from here
answer.code:65:22: error: no matching function for call to ‘solve(std::vector<int>&, int, std::vector<int>&, int&, jhsy::main()::<lambda(int)>&, jhsy::main()::<lambda(int)>&)’
65 | solve(vec,1,cnt,m,f,cmp);
| ~~~~~^~~~~~~~~~~~~~~~~~~
answer.code:58:14: note: candidate: ‘template<class F, class Cmp> void jhsy::solve(int, int, F&&, Cmp&&)’
58 | void solve(int n,int m,F &&f,Cmp &&cmp) {
| ^~~~~
answer.code:58:14: note: template argument deduction/substitution failed:
answer.code:65:22: note: candidate expects 4 arguments, 6 provided
65 | solve(vec,1,cnt,m,f,cmp);
| ~~~~~^~~~~~~~~~~~~~~~~~~
answer.code: In function ‘int main()’:
answer.code:98:16: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
98 | freopen("test.in","r",stdin);
| ^
answer.code:99:16: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
99 | freopen("test.out","w",stdout);
| ^