/ Vijos /

记录详情

Time Exceeded

foo.cc: In function 'void clear_all()':
foo.cc:28:54: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
   28 |     for(int i=0;i<=ctt;i++){clear(v[i]);lf[i]=line[i]=siz[i]=0;}
      |                                               ~~~~~~~^~~~~~~~~
foo.cc: In function 'void dfs1(int)':
foo.cc:35:18: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   35 |     for(int i=0;i<v[x].size();i++)
      |                 ~^~~~~~~~~~~~
foo.cc: In function 'int main()':
foo.cc:61:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   61 | {scanf("%d",&T);for(int z=1;z<=T;z++){solve();clear_all();}return 0;}//拜拜程序~
      |  ~~~~~^~~~~~~~~
foo.cc: In function 'void solve()':
foo.cc:46:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   46 |     scanf("%d%d",&n,&k);ctt=n;
      |     ~~~~~^~~~~~~~~~~~~~
foo.cc:47:32: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   47 |     for(int i=1;i<=n;i++){scanf("%d%d%d",&fa[i],&a[i],&w[i]);lf[fa[i]]=true;}
      |                           ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[Hydro](https://hydro.ac)提供评测服务
# 状态 耗时 内存占用
#1 Accepted 417ms 51.992 MiB
#2 Time Exceeded ≥2128ms ≥391.242 MiB
#3 Time Exceeded ≥2128ms ≥391.117 MiB
#4 Time Exceeded ≥2151ms ≥382.117 MiB
#5 Time Exceeded ≥2129ms ≥381.992 MiB
#6 Accepted 419ms 51.742 MiB
#7 Accepted 419ms 51.742 MiB
#8 Time Exceeded ≥2124ms ≥391.242 MiB
#9 Time Exceeded ≥2129ms ≥391.242 MiB
#10 Time Exceeded ≥2125ms ≥391.242 MiB

信息

递交者
类型
递交
题目
P2020 小Q的苹果树
语言
C++
递交时间
2021-12-19 16:31:33
评测时间
2021-12-19 16:31:33
评测机
分数
30
总耗时
≥16173ms
峰值内存
≥391.242 MiB