/in/foo.cc: In function 'void dts::tr_dfs1(dts::ll, dts::ll)':
/in/foo.cc:29:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (ll i=0;i<tr[now].s.size();i++)
~^~~~~~~~~~~~~~~~~
/in/foo.cc: In function 'void dts::tr_dfs2(dts::ll, dts::ll)':
/in/foo.cc:48:17: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (ll i=0;i<tr[now].s.size();i++)
~^~~~~~~~~~~~~~~~~
/in/foo.cc: In function 'dts::ll dts::ask(dts::ll, dts::ll)':
/in/foo.cc:149:16: warning: array subscript is below array bounds [-Warray-bounds]
ians+=st_ask(&nst[-1],1,tr[tr[i].top].id,tr[i].id);
~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/in/foo.cc:151:16: warning: array subscript is below array bounds [-Warray-bounds]
jans+=st_ask(&nst[-1],1,tr[tr[j].top].id,tr[j].id);
~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/in/foo.cc:152:27: warning: array subscript is below array bounds [-Warray-bounds]
ll ansn=ians+jans+st_ask(&nst[-1],1,tr[lcan].id,tr[i].id)+st_ask(&nst[-1],1,tr[lcan].id,tr[j].id)-st_ask(&nst[-1],1,tr[lcan].id,tr[lcan].id);
~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/in/foo.cc:152:67: warning: array subscript is below array bounds [-Warray-bounds]
ll ansn=ians+jans+st_ask(&nst[-1],1,tr[lcan].id,tr[i].id)+st_ask(&nst[-1],1,tr[lcan].id,tr[j].id)-st_ask(&nst[-1],1,tr[lcan].id,tr[lcan].id);
~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/in/foo.cc:152:107: warning: array subscript is below array bounds [-Warray-bounds]
ll ansn=ians+jans+st_ask(&nst[-1],1,tr[lcan].id,tr[i].id)+st_ask(&nst[-1],1,tr[lcan].id,tr[j].id)-st_ask(&nst[-1],1,tr[lcan].id,tr[lcan].id);
~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/in/foo.cc:153:17: warning: array subscript is below array bounds [-Warray-bounds]
ll ansl=st_ask(&lst[-1],1,tr[lcan].dep,tr[x].dep)+st_ask(&lst[-1],1,tr[lcan].dep,tr[y].dep)-st_ask(&lst[-1],1,tr[lcan].dep,tr[lcan].dep);
~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/in/foo.cc:153:59: warning: array subscript is below array bounds [-Warray-bounds]
ll ansl=st_ask(&lst[-1],1,tr[lcan].dep,tr[x].dep)+st_ask(&lst[-1],1,tr[lcan].dep,tr[y].dep)-st_ask(&lst[-1],1,tr[lcan].dep,tr[lcan].dep);
~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/in/foo.cc:153:101: warning: array subscript is below array bounds [-Warray-bounds]
ll ansl=st_ask(&lst[-1],1,tr[lcan].dep,tr[x].dep)+st_ask(&lst[-1],1,tr[lcan].dep,tr[y].dep)-st_ask(&lst[-1],1,tr[lcan].dep,tr[lcan].dep);
~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/in/foo.cc: In function 'void dts::main()':
/in/foo.cc:181:11: warning: array subscript is below array bounds [-Warray-bounds]
st_build(&nst[-1],1,1,cnt,&d[0]);
~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
/in/foo.cc:183:11: warning: array subscript is below array bounds [-Warray-bounds]
st_build(&lst[-1],1,1,maxdep,&d[0]);
~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
/in/foo.cc:194:15: warning: array subscript is below array bounds [-Warray-bounds]
st_update(&lst[-1],1,x,x,y);
~~~~~~~~~^~~~~~~~~~~~~~~~~~
/in/foo.cc:196:15: warning: array subscript is below array bounds [-Warray-bounds]
st_update(&lst[-1],1,x,x,-y);
~~~~~~~~~^~~~~~~~~~~~~~~~~~~