mecho.cpp:1:9: error: 'N' was not declared in this scope
1 | bool cx[N][N];
| ^
mecho.cpp:1:12: error: 'N' was not declared in this scope
1 | bool cx[N][N];
| ^
mecho.cpp:2:1: error: 'pii' does not name a type
2 | pii sta, fin;
| ^~~
mecho.cpp: In function 'bool valid(const int&, const int&)':
mecho.cpp:6:27: error: 'n' was not declared in this scope
6 | return x && y && x <= n && y <= n
| ^
mecho.cpp:7:14: error: 'a' was not declared in this scope
7 | && a[x][y] != 'T';
| ^
mecho.cpp: In function 'bool ok(const int&)':
mecho.cpp:14:5: error: 'queue' was not declared in this scope
14 | queue <adt> q;
| ^~~~~
mecho.cpp:14:15: error: expected primary-expression before '>' token
14 | queue <adt> q;
| ^
mecho.cpp:14:17: error: 'q' was not declared in this scope
14 | queue <adt> q;
| ^
mecho.cpp:15:12: error: 'cx' was not declared in this scope
15 | memset(cx, 0, sizeof cx);
| ^~
mecho.cpp:15:5: error: 'memset' was not declared in this scope
15 | memset(cx, 0, sizeof cx);
| ^~~~~~
mecho.cpp:1:1: note: 'memset' is defined in header '<cstring>'; did you forget to '#include <cstring>'?
+++ |+#include <cstring>
1 | bool cx[N][N];
mecho.cpp:16:13: error: 'sta' was not declared in this scope; did you mean 'std'?
16 | q.push({sta.fi, sta.se, 0});
| ^~~
| std
mecho.cpp:20:21: error: 'fin' was not declared in this scope
20 | if(tmp.x == fin.fi && tmp.y == fin.se) return 1;
| ^~~
mecho.cpp:21:16: error: 'i' was not declared in this scope
21 | forinc(i,0,3) {
| ^
mecho.cpp:21:9: error: 'forinc' was not declared in this scope
21 | forinc(i,0,3) {
| ^~~~~~
mecho.cpp: In function 'void solve()':
mecho.cpp:35:5: error: 'queue' was not declared in this scope
35 | queue <pii> q;
| ^~~~~
mecho.cpp:35:12: error: 'pii' was not declared in this scope
35 | queue <pii> q;
| ^~~
mecho.cpp:35:17: error: 'q' was not declared in this scope
35 | queue <pii> q;
| ^
mecho.cpp:36:12: error: 'i' was not declared in this scope
36 | forinc(i,1,n) forinc(j,1,n) {
| ^
mecho.cpp:36:16: error: 'n' was not declared in this scope
36 | forinc(i,1,n) forinc(j,1,n) {
| ^
mecho.cpp:36:5: error: 'forinc' was not declared in this scope
36 | forinc(i,1,n) forinc(j,1,n) {
| ^~~~~~
mecho.cpp:58:2: error: 't' was not declared in this scope
58 | t[fin.fi][fin.se] = inf;
| ^
mecho.cpp:58:4: error: 'fin' was not declared in this scope
58 | t[fin.fi][fin.se] = inf;
| ^~~
mecho.cpp:58:22: error: 'inf' was not declared in this scope; did you mean 'int'?
58 | t[fin.fi][fin.se] = inf;
| ^~~
| int
mecho.cpp:60:22: error: 'sta' was not declared in this scope; did you mean 'std'?
60 | int l = 0, r = t[sta.fi][sta.se], ans = -1;
| ^~~
| std
mecho.cpp:62:21: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
62 | int mid = l + r >> 1;
| ~~^~~
mecho.cpp:64:13: error: 'ans' was not declared in this scope
64 | ans = mid;
| ^~~
mecho.cpp:69:5: error: 'cout' was not declared in this scope
69 | cout << ans;
| ^~~~
mecho.cpp:69:13: error: 'ans' was not declared in this scope
69 | cout << ans;
| ^~~
mecho.cpp: In function 'void read()':
mecho.cpp:74:5: error: 'cin' was not declared in this scope
74 | cin >> n >> s;
| ^~~
mecho.cpp:74:12: error: 'n' was not declared in this scope
74 | cin >> n >> s;
| ^
mecho.cpp:74:17: error: 's' was not declared in this scope
74 | cin >> n >> s;
| ^
mecho.cpp:75:12: error: 'i' was not declared in this scope
75 | forinc(i,1,n) forinc(j,1,n)
| ^
mecho.cpp:75:5: error: 'forinc' was not declared in this scope
75 | forinc(i,1,n) forinc(j,1,n)
| ^~~~~~
mecho.cpp: At global scope:
mecho.cpp:80:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
80 | main ()
| ^~~~
mecho.cpp: In function 'int main()':
mecho.cpp:83:2: error: 'cin' was not declared in this scope
83 | cin.tie(0) -> sync_with_stdio(0);
| ^~~
mecho.cpp:84:5: error: 'fopen' was not declared in this scope
84 | if(fopen (task ".inp", "r")) {
| ^~~~~
mecho.cpp:1:1: note: 'fopen' is defined in header '<cstdio>'; did you forget to '#include <cstdio>'?
+++ |+#include <cstdio>
1 | bool cx[N][N];
mecho.cpp:85:30: error: 'stdin' was not declared in this scope
85 | freopen (task ".inp", "r", stdin);
| ^~~~~
mecho.cpp:85:30: note: 'stdin' is defined in header '<cstdio>'; did you forget to '#include <cstdio>'?
mecho.cpp:85:3: error: 'freopen' was not declared in this scope
85 | freopen (task ".inp", "r", stdin);
| ^~~~~~~
mecho.cpp:86:30: error: 'stdout' was not declared in this scope
86 | freopen (task ".out", "w", stdout);
| ^~~~~~
mecho.cpp:86:30: note: 'stdout' is defined in header '<cstdio>'; did you forget to '#include <cstdio>'?