triusis.cpp: In function 'int lis(vi)':
triusis.cpp:30:16: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
30 | if(pos == dp.size()){
| ~~~~^~~~~~~~~~~~
triusis.cpp:10:55: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
10 | #define printArr(a,l) cout<<#a<<": ";for(__i__=0;__i__<l;__i__++){cout<<a[__i__]<<" ";}cout<<endl
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
11 | #define print2dArr(a,r,c) cout<<#a<<":\n";for(__i__=0;__i__<r;__i__++){for(__j__=0;__j__<c;__j__++){cout<<a[__i__][__j__]<<" ";}cout<<endl;}
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
12 |
|
13 | #define FOR(i,a,b) for (int i = (a); i < (b); ++i)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
14 | #define F0R(i,a) FOR(i,0,a)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~
15 | #define ROF(i,a,b) for (int i = (b)-1; i >= (a); --i)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
16 | #define R0F(i,a) ROF(i,0,a)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~
17 |
|
18 | const int NN = 2e5+2, mod = 1e9 + 7;
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
19 | int n, m;
| ~~~~~~~~~
20 | vi dp, a;
| ~~~~~~~~~
21 |
|
22 | bool comp(const int &x, const int &y){
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
23 | return a[y] - a[x] <= (y-x)*m;
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
24 | }
| ~
25 |
|
26 | int lis(vi a){
| ~~~~~~~~~~~~~~
27 | vi dp;
| ~~~~~~
28 | for(int i=0;i<=n;i++){
| ~~~~~~~~~~~~~~~~~~~~~~
29 | int pos = lower_bound(dp.begin(), dp.end(), i, comp) - dp.begin();
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
30 | if(pos == dp.size()){
| ~~~~~~~~~~~~~~~~~~~~~
31 | dp.push_back(i);
| ~~~~~~~~~~~~~~~~
32 | }
| ~
33 | else if(pos != 0){
| ~~~~~~~~~~~~~~~~~~
34 | dp[pos] = i;
| ~~~~~~~~~~~~
35 | }
| ~
36 | printArr(dp, dp.size()); cout << "\n";
| ~~~~~~~~~~~~~~~~~~~~~~
triusis.cpp:36:9: note: in expansion of macro 'printArr'
36 | printArr(dp, dp.size()); cout << "\n";
| ^~~~~~~~