/in/foo.cc: In function 'int solve()':
/in/foo.cc:43:6: warning: statement has no effect [-Wunused-value]
ans + 1;
~~~~^~~
/in/foo.cc:44:13: error: 'next' was not declared in this scope
if (ans <= next[N - 1])
^~~~
/in/foo.cc:44:13: note: suggested alternative:
In file included from /usr/include/c++/6/bits/stl_algobase.h:66:0,
from /usr/include/c++/6/algorithm:61,
from /in/foo.cc:1:
/usr/include/c++/6/bits/stl_iterator_base_funcs.h:205:5: note: 'std::next'
next(_ForwardIterator __x, typename
^~~~
/in/foo.cc:48:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^