rect.cpp: In function 'lld count_rectangles(std::vector<std::vector<int> >)':
rect.cpp:5:12: warning: narrowing conversion of 'hor[i][j].std::pair<int, int>::first' from 'int' to 'short int' inside { } [-Wnarrowing]
#define fr first
^
rect.cpp:88:28: note: in expansion of macro 'fr'
horizontal.pb({hor[i][j].fr, hor[i][j].sc, i});
^~
rect.cpp:6:12: warning: narrowing conversion of 'hor[i][j].std::pair<int, int>::second' from 'int' to 'short int' inside { } [-Wnarrowing]
#define sc second
^
rect.cpp:88:42: note: in expansion of macro 'sc'
horizontal.pb({hor[i][j].fr, hor[i][j].sc, i});
^~
rect.cpp:88:48: warning: narrowing conversion of 'i' from 'int' to 'short int' inside { } [-Wnarrowing]
horizontal.pb({hor[i][j].fr, hor[i][j].sc, i});
^
rect.cpp:5:12: warning: narrowing conversion of 'ver[i][j].std::pair<int, int>::first' from 'int' to 'short int' inside { } [-Wnarrowing]
#define fr first
^
rect.cpp:89:26: note: in expansion of macro 'fr'
vertical.pb({ver[i][j].fr, ver[i][j].sc, j});
^~
rect.cpp:6:12: warning: narrowing conversion of 'ver[i][j].std::pair<int, int>::second' from 'int' to 'short int' inside { } [-Wnarrowing]
#define sc second
^
rect.cpp:89:40: note: in expansion of macro 'sc'
vertical.pb({ver[i][j].fr, ver[i][j].sc, j});
^~
rect.cpp:89:46: warning: narrowing conversion of 'j' from 'int' to 'short int' inside { } [-Wnarrowing]
vertical.pb({ver[i][j].fr, ver[i][j].sc, j});
^
rect.cpp:95:39: warning: narrowing conversion of '(((int)i.__gnu_cxx::__normal_iterator<SEGMENT*, std::vector<SEGMENT> >::operator->()->SEGMENT::t) - 1)' from 'int' to 'short int' inside { } [-Wnarrowing]
while (*j < SEGMENT{i->a, i->b, i->t-1}) j++;
~~~~^~
rect.cpp:96:37: warning: narrowing conversion of '(((int)i.__gnu_cxx::__normal_iterator<SEGMENT*, std::vector<SEGMENT> >::operator->()->SEGMENT::t) - 1)' from 'int' to 'short int' inside { } [-Wnarrowing]
if (*j == SEGMENT{i->a, i->b, i->t-1}) i->dp = j->dp+1;
~~~~^~
rect.cpp:100:39: warning: narrowing conversion of '(((int)i.__gnu_cxx::__normal_iterator<SEGMENT*, std::vector<SEGMENT> >::operator->()->SEGMENT::t) - 1)' from 'int' to 'short int' inside { } [-Wnarrowing]
while (*j < SEGMENT{i->a, i->b, i->t-1}) j++;
~~~~^~
rect.cpp:101:37: warning: narrowing conversion of '(((int)i.__gnu_cxx::__normal_iterator<SEGMENT*, std::vector<SEGMENT> >::operator->()->SEGMENT::t) - 1)' from 'int' to 'short int' inside { } [-Wnarrowing]
if (*j == SEGMENT{i->a, i->b, i->t-1}) i->dp = j->dp+1;
~~~~^~
rect.cpp:112:59: warning: narrowing conversion of 'sy' from 'int' to 'short int' inside { } [-Wnarrowing]
auto it = lower_bound(all(vertical), SEGMENT{sy, ey, ex});
^
rect.cpp:112:59: warning: narrowing conversion of 'ey' from 'int' to 'short int' inside { } [-Wnarrowing]
rect.cpp:112:59: warning: narrowing conversion of 'ex' from 'int' to 'short int' inside { } [-Wnarrowing]
rect.cpp:113:57: warning: narrowing conversion of 'sy' from 'int' to 'short int' inside { } [-Wnarrowing]
if (it == vertical.end() || *it != SEGMENT{sy, ey, ex} || it->dp <= ex-sx) continue;
^
rect.cpp:113:57: warning: narrowing conversion of 'ey' from 'int' to 'short int' inside { } [-Wnarrowing]
rect.cpp:113:57: warning: narrowing conversion of 'ex' from 'int' to 'short int' inside { } [-Wnarrowing]
rect.cpp:116:61: warning: narrowing conversion of 'sx' from 'int' to 'short int' inside { } [-Wnarrowing]
auto it = lower_bound(all(horizontal), SEGMENT{sx, ex, ey});
^
rect.cpp:116:61: warning: narrowing conversion of 'ex' from 'int' to 'short int' inside { } [-Wnarrowing]
rect.cpp:116:61: warning: narrowing conversion of 'ey' from 'int' to 'short int' inside { } [-Wnarrowing]
rect.cpp:117:59: warning: narrowing conversion of 'sx' from 'int' to 'short int' inside { } [-Wnarrowing]
if (it == horizontal.end() || *it != SEGMENT{sx, ex, ey} || it->dp <= ey-sy) continue;
^
rect.cpp:117:59: warning: narrowing conversion of 'ex' from 'int' to 'short int' inside { } [-Wnarrowing]
rect.cpp:117:59: warning: narrowing conversion of 'ey' from 'int' to 'short int' inside { } [-Wnarrowing]
rect.cpp:119:28: warning: narrowing conversion of 'sy' from 'int' to 'short int' inside { } [-Wnarrowing]
rects.pb({sy, sx, ey, ex});
^
rect.cpp:119:28: warning: narrowing conversion of 'sx' from 'int' to 'short int' inside { } [-Wnarrowing]
rect.cpp:119:28: warning: narrowing conversion of 'ey' from 'int' to 'short int' inside { } [-Wnarrowing]
rect.cpp:119:28: warning: narrowing conversion of 'ex' from 'int' to 'short int' inside { } [-Wnarrowing]