travel.cpp:1:9: error: expected unqualified-id before 'for'
1 | for(; cr_l != -1 && cr_r != n;) {
| ^~~
travel.cpp:1:15: error: 'cr_l' does not name a type
1 | for(; cr_l != -1 && cr_r != n;) {
| ^~~~
travel.cpp:1:39: error: expected unqualified-id before ')' token
1 | for(; cr_l != -1 && cr_r != n;) {
| ^
travel.cpp:22:9: error: expected unqualified-id before 'if'
22 | if(cr_r < n) {
| ^~
travel.cpp:24:11: error: expected unqualified-id before 'else'
24 | } else if(cr_l > -1) {
| ^~~~
travel.cpp:27:9: error: 'cout' does not name a type
27 | cout << ans << '\n';
| ^~~~
travel.cpp:28:5: error: expected declaration before '}' token
28 | }
| ^
travel.cpp:29:1: error: expected declaration before '}' token
29 | }
| ^