restore.cpp: In function 'void solve()':
restore.cpp:54:52: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
54 | if (find(d, d + n + 1, numeric_limits<int>::max() != d + n + 1) {
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
restore.cpp:54:65: error: expected ')' before '{' token
54 | if (find(d, d + n + 1, numeric_limits<int>::max() != d + n + 1) {
| ~ ^~
| )
restore.cpp:54:2: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
54 | if (find(d, d + n + 1, numeric_limits<int>::max() != d + n + 1) {
| ^~
restore.cpp:58:18: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
58 | for (int i = 1; i <= n; i++) {
| ^
restore.cpp:58:18: error: 'i' was not declared in this scope