0_0_39080071_16274.cpp: In lambda function:
0_0_39080071_16274.cpp:47:87: error: inconsistent types 'void' and 'int' deduced for lambda return type
47 | if (xx <= n && yy <= n && !vis[xx][yy] && g[xx][yy]) if (dfs1(xx, yy)) return 1;
| ^
0_0_39080071_16274.cpp:47:87: error: return-statement with a value, in function returning 'void' [-fpermissive]
0_0_39080071_16274.cpp:49:87: error: inconsistent types 'void' and 'int' deduced for lambda return type
49 | if (xx <= n && yy <= n && !vis[xx][yy] && g[xx][yy]) if (dfs1(xx, yy)) return 1;
| ^
0_0_39080071_16274.cpp:49:87: error: return-statement with a value, in function returning 'void' [-fpermissive]
0_0_39080071_16274.cpp:50:16: error: inconsistent types 'void' and 'int' deduced for lambda return type
50 | return 0;
| ^
0_0_39080071_16274.cpp:50:16: error: return-statement with a value, in function returning 'void' [-fpermissive]
0_0_39080071_16274.cpp: In function 'void solve()':
0_0_39080071_16274.cpp:42:37: error: conversion from 'solve()::<lambda(int, int)>' to non-scalar type 'std::function<bool(int, int)>' requested
42 | function<bool(int, int)> dfs1 = [&](int x, int y) {
| ^~~~~~~~~~~~~~~~~~~
43 | return;
| ~~~~~~~
44 | vis[x][y] = 1;
| ~~~~~~~~~~~~~~
45 | int xx, yy;
| ~~~~~~~~~~~
46 | xx = x + 1, yy = y;
| ~~~~~~~~~~~~~~~~~~~
47 | if (xx <= n && yy <= n && !vis[xx][yy] && g[xx][yy]) if (dfs1(xx, yy)) return 1;
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
48 | xx = x, yy = y + 1;
| ~~~~~~~~~~~~~~~~~~~
49 | if (xx <= n && yy <= n && !vis[xx][yy] && g[xx][yy]) if (dfs1(xx, yy)) return 1;
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
50 | return 0;
| ~~~~~~~~~
51 | };
| ~
|