/ Vijos /

记录详情

Time Exceeded

foo.cc: In function 'void clear_all()':
foo.cc:26:54: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
   26 |     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:33:18: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   33 |     for(int i=0;i<v[x].size();i++)
      |                 ~^~~~~~~~~~~~
foo.cc: In function 'int main()':
foo.cc:59:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   59 | {scanf("%d",&T);for(int z=1;z<=T;z++){solve();clear_all();}return 0;}//拜拜程序~
      |  ~~~~~^~~~~~~~~
foo.cc: In function 'void solve()':
foo.cc:44:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   44 |     scanf("%d%d",&n,&k);ctt=n;
      |     ~~~~~^~~~~~~~~~~~~~
foo.cc:45:32: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   45 |     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 385ms 51.867 MiB
#2 Time Exceeded ≥2124ms ≥391.246 MiB
#3 Time Exceeded ≥2129ms ≥391.117 MiB
#4 Time Exceeded ≥2152ms ≥382.117 MiB
#5 Time Exceeded ≥2129ms ≥382.367 MiB
#6 Accepted 525ms 51.871 MiB
#7 Accepted 484ms 51.742 MiB
#8 Time Exceeded ≥2127ms ≥391.242 MiB
#9 Time Exceeded ≥2126ms ≥391.242 MiB
#10 Time Exceeded ≥2027ms ≥391.242 MiB

信息

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