books.cpp: In function 'long long int subtask3(std::vector<int>, int, int, int)':
books.cpp:15:25: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
15 | for(int i=s; dir==1 && i<=e || dir==-1 && i>=e; i += dir) {
| ~~~~~~~^~~~~~~
books.cpp: In function 'long long int fulltask(std::vector<int>, int)':
books.cpp:30:24: warning: format '%d' expects argument of type 'int', but argument 2 has type 'long long int' [-Wformat=]
30 | printf("total=%d, sumL=%d, sumR=%d, moveL=%d, moveR=%d\n",total,sumL,sumR,moveL,moveR);
| ~^ ~~~~~
| | |
| int long long int
| %lld
books.cpp:30:33: warning: format '%d' expects argument of type 'int', but argument 3 has type 'long long int' [-Wformat=]
30 | printf("total=%d, sumL=%d, sumR=%d, moveL=%d, moveR=%d\n",total,sumL,sumR,moveL,moveR);
| ~^ ~~~~
| | |
| int long long int
| %lld
books.cpp:30:42: warning: format '%d' expects argument of type 'int', but argument 4 has type 'long long int' [-Wformat=]
30 | printf("total=%d, sumL=%d, sumR=%d, moveL=%d, moveR=%d\n",total,sumL,sumR,moveL,moveR);
| ~^ ~~~~
| | |
| int long long int
| %lld
books.cpp:30:52: warning: format '%d' expects argument of type 'int', but argument 5 has type 'long long int' [-Wformat=]
30 | printf("total=%d, sumL=%d, sumR=%d, moveL=%d, moveR=%d\n",total,sumL,sumR,moveL,moveR);
| ~^ ~~~~~
| | |
| int long long int
| %lld
books.cpp:30:62: warning: format '%d' expects argument of type 'int', but argument 6 has type 'long long int' [-Wformat=]
30 | printf("total=%d, sumL=%d, sumR=%d, moveL=%d, moveR=%d\n",total,sumL,sumR,moveL,moveR);
| ~^ ~~~~~
| | |
| int long long int
| %lld
books.cpp:33:61: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
33 | if(right <= n-1 && (moveR < moveL || moveR == moveL && right <= rightmost)) {
| ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~
books.cpp:42:64: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
42 | else if(0 <= left && (moveR >= moveL || moveR == moveL && right > rightmost)) {
| ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
books.cpp:52:20: warning: format '%d' expects argument of type 'int', but argument 2 has type 'long long int' [-Wformat=]
52 | printf("total=%d, sumL=%d, sumR=%d, moveL=%d, moveR=%d\n",total,sumL,sumR,moveL,moveR);
| ~^ ~~~~~
| | |
| int long long int
| %lld
books.cpp:52:29: warning: format '%d' expects argument of type 'int', but argument 3 has type 'long long int' [-Wformat=]
52 | printf("total=%d, sumL=%d, sumR=%d, moveL=%d, moveR=%d\n",total,sumL,sumR,moveL,moveR);
| ~^ ~~~~
| | |
| int long long int
| %lld
books.cpp:52:38: warning: format '%d' expects argument of type 'int', but argument 4 has type 'long long int' [-Wformat=]
52 | printf("total=%d, sumL=%d, sumR=%d, moveL=%d, moveR=%d\n",total,sumL,sumR,moveL,moveR);
| ~^ ~~~~
| | |
| int long long int
| %lld
books.cpp:52:48: warning: format '%d' expects argument of type 'int', but argument 5 has type 'long long int' [-Wformat=]
52 | printf("total=%d, sumL=%d, sumR=%d, moveL=%d, moveR=%d\n",total,sumL,sumR,moveL,moveR);
| ~^ ~~~~~
| | |
| int long long int
| %lld
books.cpp:52:58: warning: format '%d' expects argument of type 'int', but argument 6 has type 'long long int' [-Wformat=]
52 | printf("total=%d, sumL=%d, sumR=%d, moveL=%d, moveR=%d\n",total,sumL,sumR,moveL,moveR);
| ~^ ~~~~~
| | |
| int long long int
| %lld