foo.cc: In function 'int main()':
foo.cc:10:7: warning: structured bindings only available with '-std=c++17' or '-std=gnu++17'
10 | bool[i] = 1;
| ^
foo.cc:10:7: error: structured binding declaration cannot have type 'bool'
10 | bool[i] = 1;
| ^~~
foo.cc:10:7: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
foo.cc:10:9: error: redeclaration of 'auto i'
10 | bool[i] = 1;
| ^
foo.cc:8:11: note: 'int i' previously declared here
8 | for (int i = 0; i < 100001; i++)
| ^
foo.cc:10:7: error: cannot decompose non-array non-class type 'int'
10 | bool[i] = 1;
| ^~~
foo.cc:10:7: warning: unused structured binding declaration [-Wunused-variable]
foo.cc:38:19: warning: comparison of constant '-1' with boolean expression is always false [-Wbool-compare]
38 | while (num[X] == -1)
| ~~~~~~~^~~~~
[Hydro](https://hydro.ac)提供评测服务