boxes.cpp: In lambda function:
boxes.cpp:17:90: warning: declaration of 'dfs' shadows a previous local [-Wshadow]
17 | const auto dfs = [&](const auto dfs, const Vec<int> &row, const Vec<int> &column) -> Vec<int> {
| ^~~~~~~~
boxes.cpp:17:16: note: shadowed declaration is here
17 | const auto dfs = [&](const auto dfs, const Vec<int> &row, const Vec<int> &column) -> Vec<int> {
| ^~~
boxes.cpp: In instantiation of 'Vec<int> smawk(int, int, const Select&) [with Select = convolve(Vec<long long int>&, Vec<long long int>&)::<lambda(int, int, int)>; Vec<int> = std::vector<int, std::allocator<int> >]':
boxes.cpp:75:49: required from here
boxes.cpp:17:22: warning: declaration of 'dfs' shadows a previous local [-Wshadow]
17 | const auto dfs = [&](const auto dfs, const Vec<int> &row, const Vec<int> &column) -> Vec<int> {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18 | if (row.empty()) {
| ~~~~~~~~~~~~~~~~~~
19 | return { };
| ~~~~~~~~~~~
20 | }
| ~
21 | Vec<int> cs;
| ~~~~~~~~~~~~
22 | cs.reserve(row.size());
| ~~~~~~~~~~~~~~~~~~~~~~~
23 | for (const auto c: column) {
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
24 | while (!cs.empty() && select(row[cs.size() - 1], cs.back(), c)) {
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
25 | cs.pop_back();
| ~~~~~~~~~~~~~~
26 | }
| ~
27 | if (cs.size() < row.size()) {
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
28 | cs.push_back(c);
| ~~~~~~~~~~~~~~~~
29 | }
| ~
30 | }
| ~
31 | Vec<int> rs;
| ~~~~~~~~~~~~
32 | rs.reserve(row.size() / 2);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~
33 | for (int i = 1; i < (int) row.size(); i += 2) {
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
34 | rs.push_back(row[i]);
| ~~~~~~~~~~~~~~~~~~~~~
35 | }
| ~
36 | const auto half = dfs(dfs, rs, cs);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
37 | Vec<int> ret(row.size());
| ~~~~~~~~~~~~~~~~~~~~~~~~~
38 | int idx = 0;
| ~~~~~~~~~~~~
39 | for (int i = 0; i < (int) row.size(); ++i) {
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
40 | if (i & 1) {
| ~~~~~~~~~~~~
41 | ret[i] = half[i / 2];
| ~~~~~~~~~~~~~~~~~~~~~
42 | }
| ~
43 | else {
| ~~~~~~
44 | ret[i] = cs[idx];
| ~~~~~~~~~~~~~~~~~
45 | const auto next = (i + 1 == (int) row.size() ? cs.back() : half[i / 2]);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
46 | while (cs[idx] < next) {
| ~~~~~~~~~~~~~~~~~~~~~~~~
47 | idx += 1;
| ~~~~~~~~~
48 | if (select(row[i], ret[i], cs[idx])) {
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
49 | ret[i] = cs[idx];
| ~~~~~~~~~~~~~~~~~
50 | }
| ~
51 | }
| ~
52 | }
| ~
53 | }
| ~
54 | return ret;
| ~~~~~~~~~~~
55 | };
| ~
boxes.cpp:17:16: note: shadowed declaration is here
17 | const auto dfs = [&](const auto dfs, const Vec<int> &row, const Vec<int> &column) -> Vec<int> {
| ^~~