/ Vijos /

记录详情

Time Exceeded

foo.cc:27:39: warning: bad option '-fwhole-program' to pragma 'optimize' [-Wpragmas]
 #pragma GCC optimize("-fwhole-program")
                                       ^
foo.cc:36:41: warning: bad option '-fcse-skip-blocks' to pragma 'optimize' [-Wpragmas]
 #pragma GCC optimize("-fcse-skip-blocks")
                                         ^
foo.cc:50:51: warning: bad option '-funsafe-loop-optimizations' to pragma 'optimize' [-Wpragmas]
 #pragma GCC optimize("-funsafe-loop-optimizations")
                                                   ^
foo.cc:57:23: warning: bad option '-fwhole-program' to attribute 'optimize' [-Wattributes]
 inline ll po(ll a,ll p){ll r=1;for(;p;p>>=1,a=a*a%mod)if(p&1)r=r*a%mod;return r;}
                       ^
foo.cc:57:23: warning: bad option '-fcse-skip-blocks' to attribute 'optimize' [-Wattributes]
foo.cc:57:23: warning: bad option '-funsafe-loop-optimizations' to attribute 'optimize' [-Wattributes]
foo.cc:64:38: warning: bad option '-fwhole-program' to attribute 'optimize' [-Wattributes]
  inline int& operator [](const int& x){return gr[x];}
                                      ^
foo.cc:64:38: warning: bad option '-fcse-skip-blocks' to attribute 'optimize' [-Wattributes]
foo.cc:64:38: warning: bad option '-funsafe-loop-optimizations' to attribute 'optimize' [-Wattributes]
foo.cc:65:29: warning: bad option '-fwhole-program' to attribute 'optimize' [-Wattributes]
  inline void ins(int u,int v){gr[u]|=(1<<v);}
                             ^
foo.cc:65:29: warning: bad option '-fcse-skip-blocks' to attribute 'optimize' [-Wattributes]
foo.cc:65:29: warning: bad option '-funsafe-loop-optimizations' to attribute 'optimize' [-Wattributes]
foo.cc:66:18: warning: bad option '-fwhole-program' to attribute 'optimize' [-Wattributes]
  inline void clr(){for(int i=0;i<13;i++)gr[i]=0;}
                  ^
foo.cc:66:18: warning: bad option '-fcse-skip-blocks' to attribute 'optimize' [-Wattributes]
foo.cc:66:18: warning: bad option '-funsafe-loop-optimizations' to attribute 'optimize' [-Wattributes]
foo.cc:67:23: warning: bad option '-fwhole-program' to attribute 'optimize' [-Wattributes]
  inline void pre(int u)//处理hash值 
                       ^
foo.cc:67:23: warning: bad option '-fcse-skip-blocks' to attribute 'optimize' [-Wattributes]
foo.cc:67:23: warning: bad option '-funsafe-loop-optimizations' to attribute 'optimize' [-Wattributes]
foo.cc:78:38: warning: bad option '-fwhole-program' to attribute 'optimize' [-Wattributes]
  inline void cst(int u,const int& lim)//求出一个联通块的hash 
                                      ^
foo.cc:78:38: warning: bad option '-fcse-skip-blocks' to attribute 'optimize' [-Wattributes]
foo.cc:78:38: warning: bad option '-funsafe-loop-optimizations' to attribute 'optimize' [-Wattributes]
foo.cc:87:30: warning: bad option '-fwhole-program' to attribute 'optimize' [-Wattributes]
  inline int ck(const int& lim)//检查联通性 
                              ^
foo.cc:87:30: warning: bad option '-fcse-skip-blocks' to attribute 'optimize' [-Wattributes]
foo.cc:87:30: warning: bad option '-funsafe-loop-optimizations' to attribute 'optimize' [-Wattributes]
foo.cc:97:31: warning: bad option '-fwhole-program' to attribute 'optimize' [-Wattributes]
  inline void spadd(int u,int V){v[0][++ct[0]]=V,x[0][ct[0]]=al[0][u],al[0][u]=ct[0];}
                               ^
foo.cc:97:31: warning: bad option '-fcse-skip-blocks' to attribute 'optimize' [-Wattributes]
foo.cc:97:31: warning: bad option '-funsafe-loop-optimizations' to attribute 'optimize' [-Wattributes]
foo.cc:99:31: warning: bad option '-fwhole-program' to attribute 'optimize' [-Wattributes]
  int* v,int* x,int* al,int& ct)//从一个图迭代到它的线图 
                               ^
foo.cc:99:31: warning: bad option '-fcse-skip-blocks' to attribute 'optimize' [-Wattributes]
foo.cc:99:31: warning: bad option '-funsafe-loop-optimizations' to attribute 'optimize' [-Wattributes]
foo.cc: In function 'void line_gr::get_line(int*, int*, int*, int, int*, int*, int*, int&)':
foo.cc:101:3: warning: this 'for' clause does not guard... [-Wmisleading-indentation]
   for(int i=1;i<=ct+1;i++)al[i]=0;ct=0;
   ^~~
foo.cc:101:35: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'for'
   for(int i=1;i<=ct+1;i++)al[i]=0;ct=0;
                                   ^~
foo.cc: At global scope:
foo.cc:111:35: warning: bad option '-fwhole-program' to attribute 'optimize' [-Wattributes]
  inline ll calcline4(int* v,int ct)//求4阶线图 
                                   ^
foo.cc:111:35: warning: bad option '-fcse-skip-blocks' to attribute 'optimize' [-Wattributes]
foo.cc:111:35: warning: bad option '-funsafe-loop-optimizations' to attribute 'optimize' [-Wattributes]
foo.cc: In function 'll line_gr::calcline4(int*, int)':
foo.cc:122:3: warning: this 'for' clause does not guard... [-Wmisleading-indentation]
   for(int i=1;i<=ct+1;i++)d1[i]=0;for(int i=1;i<=ct;i++)d2[i]=0;return ret;
   ^~~
foo.cc:122:35: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'for'
   for(int i=1;i<=ct+1;i++)d1[i]=0;for(int i=1;i<=ct;i++)d2[i]=0;return ret;
                                   ^~~
foo.cc: At global scope:
foo.cc:124:37: warning: bad option '-fwhole-program' to attribute 'optimize' [-Wattributes]
  inline ll subcalc(tree1& ter,int tt)//求一个图的k阶线图 
                                     ^
foo.cc:124:37: warning: bad option '-fcse-skip-blocks' to attribute 'optimize' [-Wattributes]
foo.cc:124:37: warning: bad option '-funsafe-loop-optimizations' to attribute 'optimize' [-Wattributes]
foo.cc: In function 'll line_gr::subcalc(tree1&, int)':
foo.cc:126:3: warning: this 'for' clause does not guard... [-Wmisleading-indentation]
   for(int i=1;i<=ct[0]+1;i++)al[0][i]=0;ct[0]=0;
   ^~~
foo.cc:126:41: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'for'
   for(int i=1;i<=ct[0]+1;i++)al[0][i]=0;ct[0]=0;
                                         ^~
foo.cc: At global scope:
foo.cc:134:28: warning: bad option '-fwhole-program' to attribute 'optimize' [-Wattributes]
  inline ll calcw(tree1& ter)//容斥 
                            ^
foo.cc:134:28: warning: bad option '-fcse-skip-blocks' to attribute 'optimize' [-Wattributes]
foo.cc:134:28: warning: bad option '-funsafe-loop-optimizations' to attribute 'optimize' [-Wattributes]
foo.cc:144:28: warning: bad option '-fwhole-program' to attribute 'optimize' [-Wattributes]
 inline void add(int u,int V){v[++ct]=V;x[ct]=al[u];al[u]=ct;d[V]++;}
                            ^
foo.cc:144:28: warning: bad option '-fcse-skip-blocks' to attribute 'optimize' [-Wattributes]
foo.cc:144:28: warning: bad option '-funsafe-loop-optimizations' to attribute 'optimize' [-Wattributes]
foo.cc:145:28: warning: bad option '-fwhole-program' to attribute 'optimize' [-Wattributes]
 inline void dfs(int u,int f)//树形dp 
                            ^
foo.cc:145:28: warning: bad option '-fcse-skip-blocks' to attribute 'optimize' [-Wattributes]
foo.cc:145:28: warning: bad option '-funsafe-loop-optimizations' to attribute 'optimize' [-Wattributes]
foo.cc: In function 'void dfs(int, int)':
foo.cc:150:3: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
   if(ntr.siz[rt]==1)continue;if(son<siz[sub[rt]]){dp[u][rt]=0;continue;}
   ^~
foo.cc:150:30: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
   if(ntr.siz[rt]==1)continue;if(son<siz[sub[rt]]){dp[u][rt]=0;continue;}
                              ^~
foo.cc:151:3: warning: this 'for' clause does not guard... [-Wmisleading-indentation]
   for(int k=sub[rt];k;k=(k-1)&sub[rt])tdp[k]=0;tdp[0]=1;
   ^~~
foo.cc:151:48: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'for'
   for(int k=sub[rt];k;k=(k-1)&sub[rt])tdp[k]=0;tdp[0]=1;
                                                ^~~
foo.cc: At global scope:
foo.cc:160:33: warning: bad option '-fwhole-program' to attribute 'optimize' [-Wattributes]
 inline ll calct(const tree1& ter)//计算time 
                                 ^
foo.cc:160:33: warning: bad option '-fcse-skip-blocks' to attribute 'optimize' [-Wattributes]
foo.cc:160:33: warning: bad option '-funsafe-loop-optimizations' to attribute 'optimize' [-Wattributes]
foo.cc:168:49: warning: bad option '-fwhole-program' to attribute 'optimize' [-Wattributes]
 inline void solve(int hd,int cur,int sum,int tar)//搜出所有不同构的树 
                                                 ^
foo.cc:168:49: warning: bad option '-fcse-skip-blocks' to attribute 'optimize' [-Wattributes]
foo.cc:168:49: warning: bad option '-funsafe-loop-optimizations' to attribute 'optimize' [-Wattributes]
foo.cc: In function 'void solve(int, int, int, int)':
foo.cc:172:3: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
   if(cur!=tar)return;tp=0;ntr.clr();
   ^~
foo.cc:172:22: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
   if(cur!=tar)return;tp=0;ntr.clr();
                      ^~
foo.cc: At global scope:
foo.cc:181:21: warning: bad option '-fwhole-program' to attribute 'optimize' [-Wattributes]
 inline ll calcline2()//二阶线图 
                     ^
foo.cc:181:21: warning: bad option '-fcse-skip-blocks' to attribute 'optimize' [-Wattributes]
foo.cc:181:21: warning: bad option '-funsafe-loop-optimizations' to attribute 'optimize' [-Wattributes]
foo.cc:183:21: warning: bad option '-fwhole-program' to attribute 'optimize' [-Wattributes]
 inline ll calcline3()//三阶线图 
                     ^
foo.cc:183:21: warning: bad option '-fcse-skip-blocks' to attribute 'optimize' [-Wattributes]
foo.cc:183:21: warning: bad option '-funsafe-loop-optimizations' to attribute 'optimize' [-Wattributes]
foo.cc: In function 'll calcline3()':
foo.cc:186:2: warning: this 'for' clause does not guard... [-Wmisleading-indentation]
  for(int i=2;i<=ct;i+=2)(ans+=(ll)(d[v[i]]-1)*(d[v[i-1]]-1))%=mod;return ans;
  ^~~
foo.cc:186:67: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'for'
  for(int i=2;i<=ct;i+=2)(ans+=(ll)(d[v[i]]-1)*(d[v[i-1]]-1))%=mod;return ans;
                                                                   ^~~~~~
foo.cc: At global scope:
foo.cc:188:10: warning: bad option '-fwhole-program' to attribute 'optimize' [-Wattributes]
 int main()
          ^
foo.cc:188:10: warning: bad option '-fcse-skip-blocks' to attribute 'optimize' [-Wattributes]
foo.cc:188:10: warning: bad option '-funsafe-loop-optimizations' to attribute 'optimize' [-Wattributes]
foo.cc: In function 'int main()':
foo.cc:199:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  scanf("%d%d",&n,&k);
  ~~~~~^~~~~~~~~~~~~~
foo.cc:200:54: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  for(int i=1,u,V;i<n;i++)scanf("%d%d",&u,&V),add(u,V),add(V,u);
                          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~
[Hydro](https://hydro.ac)提供评测服务
# 状态 耗时 内存占用
#1 Accepted 4ms 1.488 MiB
#2 Accepted 4ms 1.461 MiB
#3 Accepted 4ms 1.5 MiB
#4 Accepted 17ms 2.039 MiB
#5 Accepted 19ms 2.066 MiB
#6 Accepted 36ms 2.102 MiB
#7 Accepted 88ms 2.129 MiB
#8 Accepted 284ms 3.66 MiB
#9 Time Exceeded ≥3255ms ≥157.477 MiB
#10 Time Exceeded ≥3226ms ≥157.48 MiB

信息

递交者
类型
递交
题目
P2041 线图
语言
C++
递交时间
2021-07-17 14:59:07
评测时间
2021-07-17 14:59:07
评测机
分数
80
总耗时
≥6941ms
峰值内存
≥157.48 MiB