wiring.cpp: In function 'bool isSubtask4(std::vector<int>, std::vector<int>)':
wiring.cpp:27:98: warning: comparison of integer expressions of different signedness: 'const int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
27 | bool isSubtask4(std::vector<int> r, std::vector<int> b) { return max(r[r.size()-1],b[b.size()-1])==r.size()+b.size();}
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~
wiring.cpp: In function 'long long int subtask4(std::vector<int>, std::vector<int>)':
wiring.cpp:77:33: warning: format '%d' expects argument of type 'int', but argument 3 has type 'long long int' [-Wformat=]
77 | printf("i=%d, cntL=%d, sumL=%d, sumL2=%d, cntR=%d, sumR=%d, sumR2=%d\n",i,cntL,sumL,sumL2,cntR,sumR,sumR2);
| ~^ ~~~~
| | |
| int long long int
| %lld
wiring.cpp:77:42: warning: format '%d' expects argument of type 'int', but argument 4 has type 'long long int' [-Wformat=]
77 | printf("i=%d, cntL=%d, sumL=%d, sumL2=%d, cntR=%d, sumR=%d, sumR2=%d\n",i,cntL,sumL,sumL2,cntR,sumR,sumR2);
| ~^ ~~~~
| | |
| int long long int
| %lld
wiring.cpp:77:52: warning: format '%d' expects argument of type 'int', but argument 5 has type 'long long int' [-Wformat=]
77 | printf("i=%d, cntL=%d, sumL=%d, sumL2=%d, cntR=%d, sumR=%d, sumR2=%d\n",i,cntL,sumL,sumL2,cntR,sumR,sumR2);
| ~^ ~~~~~
| | |
| int long long int
| %lld
wiring.cpp:77:61: warning: format '%d' expects argument of type 'int', but argument 6 has type 'long long int' [-Wformat=]
77 | printf("i=%d, cntL=%d, sumL=%d, sumL2=%d, cntR=%d, sumR=%d, sumR2=%d\n",i,cntL,sumL,sumL2,cntR,sumR,sumR2);
| ~^ ~~~~
| | |
| int long long int
| %lld
wiring.cpp:77:70: warning: format '%d' expects argument of type 'int', but argument 7 has type 'long long int' [-Wformat=]
77 | printf("i=%d, cntL=%d, sumL=%d, sumL2=%d, cntR=%d, sumR=%d, sumR2=%d\n",i,cntL,sumL,sumL2,cntR,sumR,sumR2);
| ~^ ~~~~
| | |
| int long long int
| %lld
wiring.cpp:77:80: warning: format '%d' expects argument of type 'int', but argument 8 has type 'long long int' [-Wformat=]
77 | printf("i=%d, cntL=%d, sumL=%d, sumL2=%d, cntR=%d, sumR=%d, sumR2=%d\n",i,cntL,sumL,sumL2,cntR,sumR,sumR2);
| ~^ ~~~~~
| | |
| int long long int
| %lld
wiring.cpp:78:26: warning: format '%d' expects argument of type 'int', but argument 2 has type 'long long int' [-Wformat=]
78 | printf("dp1=%d, dp2=%d\n",dp1,dp2);
| ~^ ~~~
| | |
| int long long int
| %lld
wiring.cpp:78:34: warning: format '%d' expects argument of type 'int', but argument 3 has type 'long long int' [-Wformat=]
78 | printf("dp1=%d, dp2=%d\n",dp1,dp2);
| ~^ ~~~
| | |
| int long long int
| %lld
wiring.cpp: In function 'long long int subtask1(std::vector<int>, std::vector<int>)':
wiring.cpp:140:7: warning: this 'for' clause does not guard... [-Wmisleading-indentation]
140 | for(int j=1; j<m; j++)
| ^~~
wiring.cpp:143:2: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'for'
143 | return dp[n-1][m-1];
| ^~~~~~