/ Vijos /

记录详情

Accepted

/in/foo.cc: In function 'void dts::tr_dfs1(ll, ll)':
/in/foo.cc:29:22: warning: comparison of integer expressions of different signedness: 'dts::ll' {aka 'long long int'} and 'std::vector<long long int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   29 |         for (ll i=0;i<tr[now].s.size();i++)
      |                     ~^~~~~~~~~~~~~~~~~
/in/foo.cc: In function 'void dts::tr_dfs2(ll, ll)':
/in/foo.cc:48:26: warning: comparison of integer expressions of different signedness: 'dts::ll' {aka 'long long int'} and 'std::vector<long long int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   48 |             for (ll i=0;i<tr[now].s.size();i++)
      |                         ~^~~~~~~~~~~~~~~~~
/in/foo.cc: In function 'dts::ll dts::ask(ll, ll)':
/in/foo.cc:152:33: warning: array subscript -1 is below array bounds of 'dts::st_node [131073]' [-Warray-bounds]
  152 |         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:83:13: note: while referencing 'dts::nst'
   83 |     st_node nst[(1<<17)+1],lst[(1<<17)+1];//nst:按節點的線段樹,lst:按深度的線段樹
      |             ^~~
/in/foo.cc:152:73: warning: array subscript -1 is below array bounds of 'dts::st_node [131073]' [-Warray-bounds]
  152 |         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:83:13: note: while referencing 'dts::nst'
   83 |     st_node nst[(1<<17)+1],lst[(1<<17)+1];//nst:按節點的線段樹,lst:按深度的線段樹
      |             ^~~
/in/foo.cc:152:113: warning: array subscript -1 is below array bounds of 'dts::st_node [131073]' [-Warray-bounds]
  152 |         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:83:13: note: while referencing 'dts::nst'
   83 |     st_node nst[(1<<17)+1],lst[(1<<17)+1];//nst:按節點的線段樹,lst:按深度的線段樹
      |             ^~~
/in/foo.cc:153:23: warning: array subscript -1 is below array bounds of 'dts::st_node [131073]' [-Warray-bounds]
  153 |         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:83:28: note: while referencing 'dts::lst'
   83 |     st_node nst[(1<<17)+1],lst[(1<<17)+1];//nst:按節點的線段樹,lst:按深度的線段樹
      |                            ^~~
/in/foo.cc:153:65: warning: array subscript -1 is below array bounds of 'dts::st_node [131073]' [-Warray-bounds]
  153 |         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:83:28: note: while referencing 'dts::lst'
   83 |     st_node nst[(1<<17)+1],lst[(1<<17)+1];//nst:按節點的線段樹,lst:按深度的線段樹
      |                            ^~~
/in/foo.cc:153:107: warning: array subscript -1 is below array bounds of 'dts::st_node [131073]' [-Warray-bounds]
  153 |         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:83:28: note: while referencing 'dts::lst'
   83 |     st_node nst[(1<<17)+1],lst[(1<<17)+1];//nst:按節點的線段樹,lst:按深度的線段樹
      |                            ^~~
/in/foo.cc:151:25: warning: array subscript -1 is below array bounds of 'dts::st_node [131073]' [-Warray-bounds]
  151 |             jans+=st_ask(&nst[-1],1,tr[tr[j].top].id,tr[j].id);
      |                   ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/in/foo.cc:83:13: note: while referencing 'dts::nst'
   83 |     st_node nst[(1<<17)+1],lst[(1<<17)+1];//nst:按節點的線段樹,lst:按深度的線段樹
      |             ^~~
/in/foo.cc:149:25: warning: array subscript -1 is below array bounds of 'dts::st_node [131073]' [-Warray-bounds]
  149 |             ians+=st_ask(&nst[-1],1,tr[tr[i].top].id,tr[i].id);
      |                   ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/in/foo.cc:83:13: note: while referencing 'dts::nst'
   83 |     st_node nst[(1<<17)+1],lst[(1<<17)+1];//nst:按節點的線段樹,lst:按深度的線段樹
      |             ^~~
/in/foo.cc: In function 'void dts::main()':
/in/foo.cc:181:17: warning: array subscript -1 is below array bounds of 'dts::st_node [131073]' [-Warray-bounds]
  181 |         st_build(&nst[-1],1,1,cnt,&d[0]);
      |         ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
/in/foo.cc:83:13: note: while referencing 'dts::nst'
   83 |     st_node nst[(1<<17)+1],lst[(1<<17)+1];//nst:按節點的線段樹,lst:按深度的線段樹
      |             ^~~
/in/foo.cc:183:17: warning: array subscript -1 is below array bounds of 'dts::st_node [131073]' [-Warray-bounds]
  183 |         st_build(&lst[-1],1,1,maxdep,&d[0]);
      |         ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
/in/foo.cc:83:28: note: while referencing 'dts::lst'
   83 |     st_node nst[(1<<17)+1],lst[(1<<17)+1];//nst:按節點的線段樹,lst:按深度的線段樹
      |                            ^~~
/in/foo.cc:196:30: warning: array subscript -1 is below array bounds of 'dts::st_node [131073]' [-Warray-bounds]
  196 |                     st_update(&lst[-1],1,x,x,-y);
      |                     ~~~~~~~~~^~~~~~~~~~~~~~~~~~~
/in/foo.cc:83:28: note: while referencing 'dts::lst'
   83 |     st_node nst[(1<<17)+1],lst[(1<<17)+1];//nst:按節點的線段樹,lst:按深度的線段樹
      |                            ^~~
/in/foo.cc:194:30: warning: array subscript -1 is below array bounds of 'dts::st_node [131073]' [-Warray-bounds]
  194 |                     st_update(&lst[-1],1,x,x,y);
      |                     ~~~~~~~~~^~~~~~~~~~~~~~~~~~
/in/foo.cc:83:28: note: while referencing 'dts::lst'
   83 |     st_node nst[(1<<17)+1],lst[(1<<17)+1];//nst:按節點的線段樹,lst:按深度的線段樹
      |                            ^~~
# 状态 耗时 内存占用
#1 Accepted 10ms 13.055 MiB
#2 Accepted 10ms 13.047 MiB
#3 Accepted 10ms 13.059 MiB
#4 Accepted 19ms 13.168 MiB
#5 Accepted 134ms 15.496 MiB
#6 Accepted 10ms 13.055 MiB
#7 Accepted 18ms 13.098 MiB
#8 Accepted 131ms 13.43 MiB
#9 Accepted 84ms 13.766 MiB
#10 Accepted 136ms 13.762 MiB

信息

递交者
类型
递交
题目
P1710 Mrw的工资计划
语言
C++
递交时间
2025-03-29 17:34:26
评测时间
2025-03-29 17:34:26
评测机
分数
100
总耗时
565ms
峰值内存
15.496 MiB