books.cpp: In function 'long long int fulltask(std::vector<int>, int)':
books.cpp:29:24: warning: format '%d' expects argument of type 'int', but argument 2 has type 'long long int' [-Wformat=]
29 | printf("total=%d, sumL=%d, sumR=%d, moveL=%d, moveR=%d\n",total,sumL,sumR,moveL,moveR);
| ~^ ~~~~~
| | |
| int long long int
| %lld
books.cpp:29:33: warning: format '%d' expects argument of type 'int', but argument 3 has type 'long long int' [-Wformat=]
29 | printf("total=%d, sumL=%d, sumR=%d, moveL=%d, moveR=%d\n",total,sumL,sumR,moveL,moveR);
| ~^ ~~~~
| | |
| int long long int
| %lld
books.cpp:29:42: warning: format '%d' expects argument of type 'int', but argument 4 has type 'long long int' [-Wformat=]
29 | printf("total=%d, sumL=%d, sumR=%d, moveL=%d, moveR=%d\n",total,sumL,sumR,moveL,moveR);
| ~^ ~~~~
| | |
| int long long int
| %lld
books.cpp:29:52: warning: format '%d' expects argument of type 'int', but argument 5 has type 'long long int' [-Wformat=]
29 | printf("total=%d, sumL=%d, sumR=%d, moveL=%d, moveR=%d\n",total,sumL,sumR,moveL,moveR);
| ~^ ~~~~~
| | |
| int long long int
| %lld
books.cpp:29:62: warning: format '%d' expects argument of type 'int', but argument 6 has type 'long long int' [-Wformat=]
29 | printf("total=%d, sumL=%d, sumR=%d, moveL=%d, moveR=%d\n",total,sumL,sumR,moveL,moveR);
| ~^ ~~~~~
| | |
| int long long int
| %lld
books.cpp:32:61: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
32 | if(right <= n-1 && (moveR < moveL || moveR == moveL && right <= rightmost)) {
| ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~
books.cpp:41:64: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
41 | else if(0 <= left && (moveR >= moveL || moveR == moveL && right > rightmost)) {
| ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
books.cpp:51:20: warning: format '%d' expects argument of type 'int', but argument 2 has type 'long long int' [-Wformat=]
51 | printf("total=%d, sumL=%d, sumR=%d, moveL=%d, moveR=%d\n",total,sumL,sumR,moveL,moveR);
| ~^ ~~~~~
| | |
| int long long int
| %lld
books.cpp:51:29: warning: format '%d' expects argument of type 'int', but argument 3 has type 'long long int' [-Wformat=]
51 | printf("total=%d, sumL=%d, sumR=%d, moveL=%d, moveR=%d\n",total,sumL,sumR,moveL,moveR);
| ~^ ~~~~
| | |
| int long long int
| %lld
books.cpp:51:38: warning: format '%d' expects argument of type 'int', but argument 4 has type 'long long int' [-Wformat=]
51 | printf("total=%d, sumL=%d, sumR=%d, moveL=%d, moveR=%d\n",total,sumL,sumR,moveL,moveR);
| ~^ ~~~~
| | |
| int long long int
| %lld
books.cpp:51:48: warning: format '%d' expects argument of type 'int', but argument 5 has type 'long long int' [-Wformat=]
51 | printf("total=%d, sumL=%d, sumR=%d, moveL=%d, moveR=%d\n",total,sumL,sumR,moveL,moveR);
| ~^ ~~~~~
| | |
| int long long int
| %lld
books.cpp:51:58: warning: format '%d' expects argument of type 'int', but argument 6 has type 'long long int' [-Wformat=]
51 | printf("total=%d, sumL=%d, sumR=%d, moveL=%d, moveR=%d\n",total,sumL,sumR,moveL,moveR);
| ~^ ~~~~~
| | |
| int long long int
| %lld
books.cpp: In function 'long long int minimum_walk(std::vector<int>, int)':
books.cpp:62:1: warning: control reaches end of non-void function [-Wreturn-type]
62 | }
| ^