toll.cpp: In function 'void sol()':
toll.cpp:35:55: warning: suggest parentheses around '+' inside '<<' [-Wparentheses]
35 | ckmin(dp[i][j][a][b], dp[i][j - 1][a][c] + dp[i + 1 << (j - 1)][j - 1][c][b]);
| ~~^~~
toll.cpp:42:10: warning: unused variable 'first' [-Wunused-variable]
42 | bool first = true;
| ^~~~~
toll.cpp:27:78: warning: iteration 5 invokes undefined behavior [-Waggressive-loop-optimizations]
27 | forn(i, 0, n/k) forn(j, 0, LOG) forn(k, 0, 5) forn(l, 0, 5) dp[i][j][k][l] = inf;
| ~~~~~~~~~~~~~~~^~~~~
toll.cpp:2:43: note: within this loop
2 | #define forn(i, a, b) for (int i = (a); i <= (int)(b); ++i)
| ^
toll.cpp:27:49: note: in expansion of macro 'forn'
27 | forn(i, 0, n/k) forn(j, 0, LOG) forn(k, 0, 5) forn(l, 0, 5) dp[i][j][k][l] = inf;
| ^~~~
toll.cpp:27:78: warning: iteration 5 invokes undefined behavior [-Waggressive-loop-optimizations]
27 | forn(i, 0, n/k) forn(j, 0, LOG) forn(k, 0, 5) forn(l, 0, 5) dp[i][j][k][l] = inf;
| ~~~~~~~~~~~~~~~^~~~~
toll.cpp:2:43: note: within this loop
2 | #define forn(i, a, b) for (int i = (a); i <= (int)(b); ++i)
| ^
toll.cpp:27:35: note: in expansion of macro 'forn'
27 | forn(i, 0, n/k) forn(j, 0, LOG) forn(k, 0, 5) forn(l, 0, 5) dp[i][j][k][l] = inf;
| ^~~~
toll.cpp:27:76: warning: array subscript 5 is above array bounds of 'int [5]' [-Warray-bounds]
27 | forn(i, 0, n/k) forn(j, 0, LOG) forn(k, 0, 5) forn(l, 0, 5) dp[i][j][k][l] = inf;
| ~~~~~~~~~~~~~^