Main.cpp:205:5: error: redefinition of 'int n'
205 | int n, k, q, t, dfn[N], dfc, nfd[N], fa[N], hd[N], e[N * 2]
| ^
Main.cpp:12:5: note: 'int n' previously declared here
12 | int n, k, q, t, dfn[N], dfc, nfd[N], fa[N], hd[N], e[N * 2]
| ^
Main.cpp:205:8: error: redefinition of 'int k'
205 | int n, k, q, t, dfn[N], dfc, nfd[N], fa[N], hd[N], e[N * 2]
| ^
Main.cpp:12:8: note: 'int k' previously declared here
12 | int n, k, q, t, dfn[N], dfc, nfd[N], fa[N], hd[N], e[N * 2]
| ^
Main.cpp:205:11: error: redefinition of 'int q'
205 | int n, k, q, t, dfn[N], dfc, nfd[N], fa[N], hd[N], e[N * 2]
| ^
Main.cpp:12:11: note: 'int q' previously declared here
12 | int n, k, q, t, dfn[N], dfc, nfd[N], fa[N], hd[N], e[N * 2]
| ^
Main.cpp:205:14: error: redefinition of 'int t'
205 | int n, k, q, t, dfn[N], dfc, nfd[N], fa[N], hd[N], e[N * 2]
| ^
Main.cpp:12:14: note: 'int t' previously declared here
12 | int n, k, q, t, dfn[N], dfc, nfd[N], fa[N], hd[N], e[N * 2]
| ^
Main.cpp:205:17: error: redefinition of 'int dfn [2000000]'
205 | int n, k, q, t, dfn[N], dfc, nfd[N], fa[N], hd[N], e[N * 2]
| ^~~
Main.cpp:12:17: note: 'int dfn [2000000]' previously declared here
12 | int n, k, q, t, dfn[N], dfc, nfd[N], fa[N], hd[N], e[N * 2]
| ^~~
Main.cpp:205:25: error: redefinition of 'int dfc'
205 | int n, k, q, t, dfn[N], dfc, nfd[N], fa[N], hd[N], e[N * 2]
| ^~~
Main.cpp:12:25: note: 'int dfc' previously declared here
12 | int n, k, q, t, dfn[N], dfc, nfd[N], fa[N], hd[N], e[N * 2]
| ^~~
Main.cpp:205:30: error: redefinition of 'int nfd [2000000]'
205 | int n, k, q, t, dfn[N], dfc, nfd[N], fa[N], hd[N], e[N * 2]
| ^~~
Main.cpp:12:30: note: 'int nfd [2000000]' previously declared here
12 | int n, k, q, t, dfn[N], dfc, nfd[N], fa[N], hd[N], e[N * 2]
| ^~~
Main.cpp:205:38: error: redefinition of 'int fa [2000000]'
205 | int n, k, q, t, dfn[N], dfc, nfd[N], fa[N], hd[N], e[N * 2]
| ^~
Main.cpp:12:38: note: 'int fa [2000000]' previously declared here
12 | int n, k, q, t, dfn[N], dfc, nfd[N], fa[N], hd[N], e[N * 2]
| ^~
Main.cpp:205:45: error: redefinition of 'int hd [2000000]'
205 | int n, k, q, t, dfn[N], dfc, nfd[N], fa[N], hd[N], e[N * 2]
| ^~
Main.cpp:12:45: note: 'int hd [2000000]' previously declared here
12 | int n, k, q, t, dfn[N], dfc, nfd[N], fa[N], hd[N], e[N * 2]
| ^~
Main.cpp:205:52: error: redefinition of 'int e [4000000]'
205 | int n, k, q, t, dfn[N], dfc, nfd[N], fa[N], hd[N], e[N * 2]
| ^
Main.cpp:12:52: note: 'int e [4000000]' previously declared here
12 | int n, k, q, t, dfn[N], dfc, nfd[N], fa[N], hd[N], e[N * 2]
| ^
Main.cpp:206:3: error: redefinition of 'int Ln [4000000]'
206 | , Ln[N * 2], ii, rt, hld[N], lv[N], dis[N], sz[N]
| ^~
Main.cpp:13:3: note: 'int Ln [4000000]' previously declared here
13 | , Ln[N * 2], ii, rt, hld[N], lv[N], dis[N], sz[N]
| ^~
Main.cpp:206:14: error: redefinition of 'int ii'
206 | , Ln[N * 2], ii, rt, hld[N], lv[N], dis[N], sz[N]
| ^~
Main.cpp:13:14: note: 'int ii' previously declared here
13 | , Ln[N * 2], ii, rt, hld[N], lv[N], dis[N], sz[N]
| ^~
Main.cpp:206:18: error: redefinition of 'int rt'
206 | , Ln[N * 2], ii, rt, hld[N], lv[N], dis[N], sz[N]
| ^~
Main.cpp:13:18: note: 'int rt' previously declared here
13 | , Ln[N * 2], ii, rt, hld[N], lv[N], dis[N], sz[N]
| ^~
Main.cpp:206:22: error: redefinition of 'int hld [2000000]'
206 | , Ln[N * 2], ii, rt, hld[N], lv[N], dis[N], sz[N]
| ^~~
Main.cpp:13:22: note: 'int hld [2000000]' previously declared here
13 | , Ln[N * 2], ii, rt, hld[N], lv[N], dis[N], sz[N]
| ^~~
Main.cpp:206:30: error: redefinition of 'int lv [2000000]'
206 | , Ln[N * 2], ii, rt, hld[N], lv[N], dis[N], sz[N]
| ^~
Main.cpp:13:30: note: 'int lv [2000000]' previously declared here
13 | , Ln[N * 2], ii, rt, hld[N], lv[N], dis[N], sz[N]
| ^~
Main.cpp:206:37: error: redefinition of 'int dis [2000000]'
206 | , Ln[N * 2], ii, rt, hld[N], lv[N], dis[N], sz[N]
| ^~~
Main.cpp:13:37: note: 'int dis [2000000]' previously declared here
13 | , Ln[N * 2], ii, rt, hld[N], lv[N], dis[N], sz[N]
| ^~~
Main.cpp:206:45: error: redefinition of 'int sz [2000000]'
206 | , Ln[N * 2], ii, rt, hld[N], lv[N], dis[N], sz[N]
| ^~
Main.cpp:13:45: note: 'int sz [2000000]' previously declared here
13 | , Ln[N * 2], ii, rt, hld[N], lv[N], dis[N], sz[N]
| ^~
Main.cpp:207:3: error: redefinition of 'int hd2 [2000000]'
207 | , hd2[N], e2[N * 2], Ln2[N * 2], ii2, dfn2[N], dfc2, fa2[N]
| ^~~
Main.cpp:14:3: note: 'int hd2 [2000000]' previously declared here
14 | , hd2[N], e2[N * 2], Ln2[N * 2], ii2, dfn2[N], dfc2, fa2[N]
| ^~~
Main.cpp:207:11: error: redefinition of 'int e2 [4000000]'
207 | , hd2[N], e2[N * 2], Ln2[N * 2], ii2, dfn2[N], dfc2, fa2[N]
| ^~
Main.cpp:14:11: note: 'int e2 [4000000]' previously declared here
14 | , hd2[N], e2[N * 2], Ln2[N * 2], ii2, dfn2[N], dfc2, fa2[N]
| ^~
Main.cpp:207:22: error: redefinition of 'int Ln2 [4000000]'
207 | , hd2[N], e2[N * 2], Ln2[N * 2], ii2, dfn2[N], dfc2, fa2[N]
| ^~~
Main.cpp:14:22: note: 'int Ln2 [4000000]' previously declared here
14 | , hd2[N], e2[N * 2], Ln2[N * 2], ii2, dfn2[N], dfc2, fa2[N]
| ^~~
Main.cpp:207:34: error: redefinition of 'int ii2'
207 | , hd2[N], e2[N * 2], Ln2[N * 2], ii2, dfn2[N], dfc2, fa2[N]
| ^~~
Main.cpp:14:34: note: 'int ii2' previously declared here
14 | , hd2[N], e2[N * 2], Ln2[N * 2], ii2, dfn2[N], dfc2, fa2[N]
| ^~~
Main.cpp:207:39: error: redefinition of 'int dfn2 [2000000]'
207 | , hd2[N], e2[N * 2], Ln2[N * 2], ii2, dfn2[N], dfc2, fa2[N]
| ^~~~
Main.cpp:14:39: note: 'int dfn2 [2000000]' previously declared here
14 | , hd2[N], e2[N * 2], Ln2[N * 2], ii2, dfn2[N], dfc2, fa2[N]
| ^~~~
Main.cpp:207:48: error: redefinition of 'int dfc2'
207 | , hd2[N], e2[N * 2], Ln2[N * 2], ii2, dfn2[N], dfc2, fa2[N]
| ^~~~
Main.cpp:14:48: note: 'int dfc2' previously declared here
14 | , hd2[N], e2[N * 2], Ln2[N * 2], ii2, dfn2[N], dfc2, fa2[N]
| ^~~~
Main.cpp:207:54: error: redefinition of 'int fa2 [2000000]'
207 | , hd2[N], e2[N * 2], Ln2[N * 2], ii2, dfn2[N], dfc2, fa2[N]
| ^~~
Main.cpp:14:54: note: 'int fa2 [2000000]' previously declared here
14 | , hd2[N], e2[N * 2], Ln2[N * 2], ii2, dfn2[N], dfc2, fa2[N]
| ^~~
Main.cpp:208:3: error: redefinition of 'int hld2 [2000000]'
208 | , hld2[N], lv2[N], sz2[N], V[N + N], tp, dis2[N], sta[N]
| ^~~~
Main.cpp:15:3: note: 'int hld2 [2000000]' previously declared here
15 | , hld2[N], lv2[N], sz2[N], V[N + N], tp, dis2[N], sta[N]
| ^~~~
Main.cpp:208:12: error: redefinition of 'int lv2 [2000000]'
208 | , hld2[N], lv2[N], sz2[N], V[N + N], tp, dis2[N], sta[N]
| ^~~
Main.cpp:15:12: note: 'int lv2 [2000000]' previously declared here
15 | , hld2[N], lv2[N], sz2[N], V[N + N], tp, dis2[N], sta[N]
| ^~~
Main.cpp:208:20: error: redefinition of 'int sz2 [2000000]'
208 | , hld2[N], lv2[N], sz2[N], V[N + N], tp, dis2[N], sta[N]
| ^~~
Main.cpp:15:20: note: 'int sz2 [2000000]' previously declared here
15 | , hld2[N], lv2[N], sz2[N], V[N + N], tp, dis2[N], sta[N]
| ^~~
Main.cpp:208:28: error: redefinition of 'int V [4000000]'
208 | , hld2[N], lv2[N], sz2[N], V[N + N], tp, dis2[N], sta[N]
| ^
Main.cpp:15:28: note: 'int V [4000000]' previously declared here
15 | , hld2[N], lv2[N], sz2[N], V[N + N], tp, dis2[N], sta[N]
| ^
Main.cpp:208:38: error: redefinition of 'int tp'
208 | , hld2[N], lv2[N], sz2[N], V[N + N], tp, dis2[N], sta[N]
| ^~
Main.cpp:15:38: note: 'int tp' previously declared here
15 | , hld2[N], lv2[N], sz2[N], V[N + N], tp, dis2[N], sta[N]
| ^~
Main.cpp:208:42: error: redefinition of 'int dis2 [2000000]'
208 | , hld2[N], lv2[N], sz2[N], V[N + N], tp, dis2[N], sta[N]
| ^~~~
Main.cpp:15:42: note: 'int dis2 [2000000]' previously declared here
15 | , hld2[N], lv2[N], sz2[N], V[N + N], tp, dis2[N], sta[N]
| ^~~~
Main.cpp:208:51: error: redefinition of 'int sta [2000000]'
208 | , hld2[N], lv2[N], sz2[N], V[N + N], tp, dis2[N], sta[N]
| ^~~
Main.cpp:15:51: note: 'int sta [2000000]' previously declared here
15 | , hld2[N], lv2[N], sz2[N], V[N + N], tp, dis2[N], sta[N]
| ^~~
Main.cpp:209:3: error: redefinition of 'int e3 [4000000]'
209 | , e3[N * 2], Ln3[N * 2], ii3, hd3[N], dis3[N], cst[N * 2], lv3[N]
| ^~
Main.cpp:16:3: note: 'int e3 [4000000]' previously declared here
16 | , e3[N * 2], Ln3[N * 2], ii3, hd3[N], dis3[N], cst[N * 2], lv3[N]
| ^~
Main.cpp:209:14: error: redefinition of 'int Ln3 [4000000]'
209 | , e3[N * 2], Ln3[N * 2], ii3, hd3[N], dis3[N], cst[N * 2], lv3[N]
| ^~~
Main.cpp:16:14: note: 'int Ln3 [4000000]' previously declared here
16 | , e3[N * 2], Ln3[N * 2], ii3, hd3[N], dis3[N], cst[N * 2], lv3[N]
| ^~~
Main.cpp:209:26: error: redefinition of 'int ii3'
209 | , e3[N * 2], Ln3[N * 2], ii3, hd3[N], dis3[N], cst[N * 2], lv3[N]
| ^~~
Main.cpp:16:26: note: 'int ii3' previously declared here
16 | , e3[N * 2], Ln3[N * 2], ii3, hd3[N], dis3[N], cst[N * 2], lv3[N]
| ^~~
Main.cpp:209:31: error: redefinition of 'int hd3 [2000000]'
209 | , e3[N * 2], Ln3[N * 2], ii3, hd3[N], dis3[N], cst[N * 2], lv3[N]
| ^~~
Main.cpp:16:31: note: 'int hd3 [2000000]' previously declared here
16 | , e3[N * 2], Ln3[N * 2], ii3, hd3[N], dis3[N], cst[N * 2], lv3[N]
| ^~~
Main.cpp:209:39: error: redefinition of 'int dis3 [2000000]'
209 | , e3[N * 2], Ln3[N * 2], ii3, hd3[N], dis3[N], cst[N * 2], lv3[N]
| ^~~~
Main.cpp:16:39: note: 'int dis3 [2000000]' previously declared here
16 | , e3[N * 2], Ln3[N * 2], ii3, hd3[N], dis3[N], cst[N * 2], lv3[N]
| ^~~~
Main.cpp:209:48: error: redefinition of 'int cst [4000000]'
209 | , e3[N * 2], Ln3[N * 2], ii3, hd3[N], dis3[N], cst[N * 2], lv3[N]
| ^~~
Main.cpp:16:48: note: 'int cst [4000000]' previously declared here
16 | , e3[N * 2], Ln3[N * 2], ii3, hd3[N], dis3[N], cst[N * 2], lv3[N]
| ^~~
Main.cpp:209:60: error: redefinition of 'int lv3 [2000000]'
209 | , e3[N * 2], Ln3[N * 2], ii3, hd3[N], dis3[N], cst[N * 2], lv3[N]
| ^~~
Main.cpp:16:60: note: 'int lv3 [2000000]' previously declared here
16 | , e3[N * 2], Ln3[N * 2], ii3, hd3[N], dis3[N], cst[N * 2], lv3[N]
| ^~~
Main.cpp:210:3: error: redefinition of 'int dfn3 [2000000]'
210 | , dfn3[N], dfc3, sz3[N], hld3[N], fa3[N]
| ^~~~
Main.cpp:17:3: note: 'int dfn3 [2000000]' previously declared here
17 | , dfn3[N], dfc3, sz3[N], hld3[N], fa3[N]
| ^~~~
Main.cpp:210:12: error: redefinition of 'int dfc3'
210 | , dfn3[N], dfc3, sz3[N], hld3[N], fa3[N]
| ^~~~
Main.cpp:17:12: note: 'int dfc3' previously declared here
17 | , dfn3[N], dfc3, sz3[N], hld3[N], fa3[N]
| ^~~~
Main.cpp:210:18: error: redefinition of 'int sz3 [2000000]'
210 | , dfn3[N], dfc3, sz3[N], hld3[N], fa3[N]
| ^~~
Main.cpp:17:18: note: 'int sz3 [2000000]' previously declared here
17 | , dfn3[N], dfc3, sz3[N], hld3[N], fa3[N]
| ^~~
Main.cpp:210:26: error: redefinition of 'int hld3 [2000000]'
210 | , dfn3[N], dfc3, sz3[N], hld3[N], fa3[N]
| ^~~~
Main.cpp:17:26: note: 'int hld3 [2000000]' previously declared here
17 | , dfn3[N], dfc3, sz3[N], hld3[N], fa3[N]
| ^~~~
Main.cpp:210:35: error: redefinition of 'int fa3 [2000000]'
210 | , dfn3[N], dfc3, sz3[N], hld3[N], fa3[N]
| ^~~
Main.cpp:17:35: note: 'int fa3 [2000000]' previously declared here
17 | , dfn3[N], dfc3, sz3[N], hld3[N], fa3[N]
| ^~~
Main.cpp:211:3: error: redefinition of 'int q1 [100000]'
211 | , q1[T], q2[T], lv3_[N]
| ^~
Main.cpp:18:3: note: 'int q1 [100000]' previously declared here
18 | , q1[T], q2[T], lv3_[N]
| ^~
Main.cpp:211:10: error: redefinition of 'int q2 [100000]'
211 | , q1[T], q2[T], lv3_[N]
| ^~
Main.cpp:18:10: note: 'int q2 [100000]' previously declared here
18 | , q1[T], q2[T], lv3_[N]
| ^~
Main.cpp:211:17: error: redefinition of 'int lv3_ [2000000]'
211 | , q1[T], q2[T], lv3_[N]
| ^~~~
Main.cpp:18:17: note: 'int lv3_ [2000000]' previously declared here
18 | , q1[T], q2[T], lv3_[N]
| ^~~~
Main.cpp:214:5: error: redefinition of 'int cmp(int, int)'
214 | int cmp(int i, int j) { return dfn2[i] < dfn2[j]; }
| ^~~
Main.cpp:21:5: note: 'int cmp(int, int)' previously defined here
21 | int cmp(int i, int j) { return dfn2[i] < dfn2[j]; }
| ^~~
Main.cpp:216:6: error: redefinition of 'void add(int, int)'
216 | void add(int u, int v) { ++ii; e[ii] = v, Ln[ii] = hd[u]; hd[u] = ii; }
| ^~~
Main.cpp:23:6: note: 'void add(int, int)' previously defined here
23 | void add(int u, int v) { ++ii; e[ii] = v, Ln[ii] = hd[u]; hd[u] = ii; }
| ^~~
Main.cpp:217:6: error: redefinition of 'void add2(int, int)'
217 | void add2(int u, int v) {++ii2; e2[ii2] = v, Ln2[ii2] = hd2[u]; hd2[u] = ii2;}
| ^~~~
Main.cpp:24:6: note: 'void add2(int, int)' previously defined here
24 | void add2(int u, int v) {++ii2; e2[ii2] = v, Ln2[ii2] = hd2[u]; hd2[u] = ii2;}
| ^~~~
Main.cpp:218:6: error: redefinition of 'void add3(int, int, int)'
218 | void add3(int u, int v, int w) {
| ^~~~
Main.cpp:25:6: note: 'void add3(int, int, int)' previously defined here
25 | void add3(int u, int v, int w) {
| ^~~~
Main.cpp:221:6: error: redefinition of 'void dfs(int)'
221 | void dfs(int u) {
| ^~~
Main.cpp:28:6: note: 'void dfs(int)' previously defined here
28 | void dfs(int u) {
| ^~~
Main.cpp:232:6: error: redefinition of 'void dfs2(int)'
232 | void dfs2(int u) {
| ^~~~
Main.cpp:39:6: note: 'void dfs2(int)' previously defined here
39 | void dfs2(int u) {
| ^~~~
Main.cpp:242:6: error: redefinition of 'void efs(int)'
242 | void efs(int u) {
| ^~~
Main.cpp:49:6: note: 'void efs(int)' previously defined here
49 | void efs(int u) {
| ^~~
Main.cpp:255:6: error: redefinition of 'void efs2(int)'
255 | void efs2(int u) {
| ^~~~
Main.cpp:62:6: note: 'void efs2(int)' previously defined here
62 | void efs2(int u) {
| ^~~~
Main.cpp:265:6: error: redefinition of 'void gfs(int)'
265 | void gfs(int u) {
| ^~~
Main.cpp:72:6: note: 'void gfs(int)' previously defined here
72 | void gfs(int u) {
| ^~~
Main.cpp:278:6: error: redefinition of 'void gfs2(int)'
278 | void gfs2(int u) {
| ^~~~
Main.cpp:85:6: note: 'void gfs2(int)' previously defined here
85 | void gfs2(int u) {
| ^~~~
Main.cpp:288:5: error: redefinition of 'int lca(int, int)'
288 | int lca(int u, int v) {
| ^~~
Main.cpp:95:5: note: 'int lca(int, int)' previously defined here
95 | int lca(int u, int v) {
| ^~~
Main.cpp:295:5: error: redefinition of 'int lca2(int, int)'
295 | int lca2(int u, int v) {
| ^~~~
Main.cpp:102:5: note: 'int lca2(int, int)' previously defined here
102 | int lca2(int u, int v) {
| ^~~~
Main.cpp:302:5: error: redefinition of 'int lca3(int, int)'
302 | int lca3(int u, int v) {
| ^~~~
Main.cpp:109:5: note: 'int lca3(int, int)' previously defined here
109 | int lca3(int u, int v) {
| ^~~~
Main.cpp:309:5: error: redefinition of 'int main()'
309 | int main() {
| ^~~~
Main.cpp:116:5: note: 'int main()' previously defined here
116 | int main() {
| ^~~~
Main.cpp: In function 'int main()':
Main.cpp:117:14: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
117 | scanf("%d%d%d%d", &n, &k, &q, &t);
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
Main.cpp:120:22: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
120 | scanf("%d", &j);
| ~~~~~^~~~~~~~~~
Main.cpp:126:22: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
126 | scanf("%d", &j);
| ~~~~~^~~~~~~~~~
Main.cpp:150:22: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
150 | scanf("%d%d%d%d", &_, dis + nfd[i], &__, dis2 + nfd[i]);
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Main.cpp:155:22: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
155 | scanf("%d%d%d%d", &_, &_, &d1, &d2);
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Main.cpp:178:22: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
178 | scanf("%d%d", &q1[i], &q2[i]), --q1[i], --q2[i];
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
Main.cpp: In function 'int main()':
Main.cpp:310:14: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
310 | scanf("%d%d%d%d", &n, &k, &q, &t);
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
Main.cpp:313:22: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
313 | scanf("%d", &j);
| ~~~~~^~~~~~~~~~
Main.cpp:319:22: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
319 | scanf("%d", &j);
| ~~~~~^~~~~~~~~~
Main.cpp:343:22: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
343 | scanf("%d%d%d%d", &_, dis + nfd[i], &__, dis2 + nfd[i]);
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Main.cpp:348:22: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
348 | scanf("%d%d%d%d", &_, &_, &d1, &d2);
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Main.cpp:371:22: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
371 | scanf("%d%d", &q1[i], &q2[i]), --q1[i], --q2[i];
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~