/ new_bzoj /

记录详情

Compile Error

foo.c:3:1: error: unknown type name 'using'
 using namespace std;
 ^~~~~
foo.c:3:17: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'std'
 using namespace std;
                 ^~~
foo.c:11:2: error: expected specifier-qualifier-list before 'tree'
  tree()
  ^~~~
foo.c: In function 'work_add':
foo.c:17:12: error: 'struct tree' has no member named 'r'
  int n=t[p].r-t[p].l+1,lim=min(n,20);
            ^
foo.c:17:19: error: 'struct tree' has no member named 'l'
  int n=t[p].r-t[p].l+1,lim=min(n,20);
                   ^
foo.c:19:94: error: 'struct tree' has no member named 'f'
  for(int i=lim;i>=1;--i) for(int k=1,now=v;k<=i;++k,now=(long long)now*(long long)v%mod) t[p].f[i]=(t[p].f[i]+(((long long)C[n-(i-k)][k]*(long long)t[p].f[i-k]%mod)*(long long)now%mod))%mod;
                                                                                              ^
foo.c:19:105: error: 'struct tree' has no member named 'f'
  for(int i=lim;i>=1;--i) for(int k=1,now=v;k<=i;++k,now=(long long)now*(long long)v%mod) t[p].f[i]=(t[p].f[i]+(((long long)C[n-(i-k)][k]*(long long)t[p].f[i-k]%mod)*(long long)now%mod))%mod;
                                                                                                         ^
foo.c:19:153: error: 'struct tree' has no member named 'f'
  for(int i=lim;i>=1;--i) for(int k=1,now=v;k<=i;++k,now=(long long)now*(long long)v%mod) t[p].f[i]=(t[p].f[i]+(((long long)C[n-(i-k)][k]*(long long)t[p].f[i-k]%mod)*(long long)now%mod))%mod;
                                                                                                                                                         ^
foo.c:20:6: error: 'struct tree' has no member named 'add'
  t[p].add=(t[p].add+v)%mod;
      ^
foo.c:20:16: error: 'struct tree' has no member named 'add'
  t[p].add=(t[p].add+v)%mod;
                ^
foo.c: In function 'work_rev':
foo.c:24:18: error: 'struct tree' has no member named 'r'
  int lim=min(t[p].r-t[p].l+1,20);
                  ^
foo.c:2:19: note: in definition of macro 'min'
 #define min(a,b) (a<b?a:b)
                   ^
foo.c:24:25: error: 'struct tree' has no member named 'l'
  int lim=min(t[p].r-t[p].l+1,20);
                         ^
foo.c:2:19: note: in definition of macro 'min'
 #define min(a,b) (a<b?a:b)
                   ^
foo.c:24:18: error: 'struct tree' has no member named 'r'
  int lim=min(t[p].r-t[p].l+1,20);
                  ^
foo.c:2:23: note: in definition of macro 'min'
 #define min(a,b) (a<b?a:b)
                       ^
foo.c:24:25: error: 'struct tree' has no member named 'l'
  int lim=min(t[p].r-t[p].l+1,20);
                         ^
foo.c:2:23: note: in definition of macro 'min'
 #define min(a,b) (a<b?a:b)
                       ^
foo.c:25:31: error: 'struct tree' has no member named 'f'
  for(int i=1;i<=lim;i+=2) t[p].f[i]=((mod-t[p].f[i])%mod+mod)%mod;
                               ^
foo.c:25:47: error: 'struct tree' has no member named 'f'
  for(int i=1;i<=lim;i+=2) t[p].f[i]=((mod-t[p].f[i])%mod+mod)%mod;
                                               ^
foo.c:26:6: error: 'struct tree' has no member named 'add'
  t[p].add=((mod-t[p].add)%mod+mod)%mod;t[p].rev*=-1;
      ^
foo.c:26:21: error: 'struct tree' has no member named 'add'
  t[p].add=((mod-t[p].add)%mod+mod)%mod;t[p].rev*=-1;
                     ^
foo.c:26:44: error: 'struct tree' has no member named 'rev'
  t[p].add=((mod-t[p].add)%mod+mod)%mod;t[p].rev*=-1;
                                            ^
foo.c: In function 'pushup':
foo.c:30:18: error: 'struct tree' has no member named 'r'
  int lim=min(t[p].r-t[p].l+1,20);
                  ^
foo.c:2:19: note: in definition of macro 'min'
 #define min(a,b) (a<b?a:b)
                   ^
foo.c:30:25: error: 'struct tree' has no member named 'l'
  int lim=min(t[p].r-t[p].l+1,20);
                         ^
foo.c:2:19: note: in definition of macro 'min'
 #define min(a,b) (a<b?a:b)
                   ^
foo.c:30:18: error: 'struct tree' has no member named 'r'
  int lim=min(t[p].r-t[p].l+1,20);
                  ^
foo.c:2:23: note: in definition of macro 'min'
 #define min(a,b) (a<b?a:b)
                       ^
foo.c:30:25: error: 'struct tree' has no member named 'l'
  int lim=min(t[p].r-t[p].l+1,20);
                         ^
foo.c:2:23: note: in definition of macro 'min'
 #define min(a,b) (a<b?a:b)
                       ^
foo.c:33:7: error: 'struct tree' has no member named 'f'
   t[p].f[i]=0;
       ^
foo.c:34:29: error: 'struct tree' has no member named 'f'
   for(int k=0;k<=i;++k) t[p].f[i]=(t[p].f[i]+((long long)t[ls].f[k]*(long long)t[rs].f[i-k]%mod))%mod;
                             ^
foo.c:34:40: error: 'struct tree' has no member named 'f'
   for(int k=0;k<=i;++k) t[p].f[i]=(t[p].f[i]+((long long)t[ls].f[k]*(long long)t[rs].f[i-k]%mod))%mod;
                                        ^
foo.c:34:63: error: 'struct tree' has no member named 'f'
   for(int k=0;k<=i;++k) t[p].f[i]=(t[p].f[i]+((long long)t[ls].f[k]*(long long)t[rs].f[i-k]%mod))%mod;
                                                               ^
foo.c:34:85: error: 'struct tree' has no member named 'f'
   for(int k=0;k<=i;++k) t[p].f[i]=(t[p].f[i]+((long long)t[ls].f[k]*(long long)t[rs].f[i-k]%mod))%mod;
                                                                                     ^
foo.c: In function 'spread':
foo.c:39:9: error: 'struct tree' has no member named 'rev'
  if(t[p].rev!=1) {work_rev(ls);work_rev(rs);t[p].rev=1;}
         ^
foo.c:39:49: error: 'struct tree' has no member named 'rev'
  if(t[p].rev!=1) {work_rev(ls);work_rev(rs);t[p].rev=1;}
                                                 ^
foo.c:40:9: error: 'struct tree' has no member named 'add'
  if(t[p].add) {work_add(ls,t[p].add);work_add(rs,t[p].add);t[p].add=0;}
         ^
foo.c:40:32: error: 'struct tree' has no member named 'add'
  if(t[p].add) {work_add(ls,t[p].add);work_add(rs,t[p].add);t[p].add=0;}
                                ^
foo.c:40:54: error: 'struct tree' has no member named 'add'
  if(t[p].add) {work_add(ls,t[p].add);work_add(rs,t[p].add);t[p].add=0;}
                                                      ^
foo.c:40:64: error: 'struct tree' has no member named 'add'
  if(t[p].add) {work_add(ls,t[p].add);work_add(rs,t[p].add);t[p].add=0;}
                                                                ^
foo.c: In function 'build':
foo.c:44:6: error: 'struct tree' has no member named 'rev'
  t[p].rev=1; t[p].add=0; t[p].l=l; t[p].r=r; t[p].f[0]=1; if(l==r) {t[p].f[1]=a[l];return;} 
      ^
foo.c:44:18: error: 'struct tree' has no member named 'add'
  t[p].rev=1; t[p].add=0; t[p].l=l; t[p].r=r; t[p].f[0]=1; if(l==r) {t[p].f[1]=a[l];return;} 
                  ^
foo.c:44:30: error: 'struct tree' has no member named 'l'
  t[p].rev=1; t[p].add=0; t[p].l=l; t[p].r=r; t[p].f[0]=1; if(l==r) {t[p].f[1]=a[l];return;} 
                              ^
foo.c:44:40: error: 'struct tree' has no member named 'r'
  t[p].rev=1; t[p].add=0; t[p].l=l; t[p].r=r; t[p].f[0]=1; if(l==r) {t[p].f[1]=a[l];return;} 
                                        ^
foo.c:44:50: error: 'struct tree' has no member named 'f'
  t[p].rev=1; t[p].add=0; t[p].l=l; t[p].r=r; t[p].f[0]=1; if(l==r) {t[p].f[1]=a[l];return;} 
                                                  ^
foo.c:44:73: error: 'struct tree' has no member named 'f'
  t[p].rev=1; t[p].add=0; t[p].l=l; t[p].r=r; t[p].f[0]=1; if(l==r) {t[p].f[1]=a[l];return;} 
                                                                         ^
foo.c: In function 'change_add':
foo.c:49:12: error: 'struct tree' has no member named 'l'
  int L=t[p].l,R=t[p].r,mid=(L+R)>>1;
            ^
foo.c:49:21: error: 'struct tree' has no member named 'r'
  int L=t[p].l,R=t[p].r,mid=(L+R)>>1;
                     ^
foo.c: In function 'change_rev':
foo.c:58:12: error: 'struct tree' has no member named 'l'
  int L=t[p].l,R=t[p].r,mid=(L+R)>>1;
            ^
foo.c:58:21: error: 'struct tree' has no member named 'r'
  int L=t[p].l,R=t[p].r,mid=(L+R)>>1;
                     ^
foo.c: At top level:
foo.c:65:1: error: unknown type name 'tree'; use 'struct' keyword to refer to the type
 tree ask(int p,int l,int r)
 ^~~~
 struct 
foo.c: In function 'ask':
foo.c:67:12: error: 'struct tree' has no member named 'l'
  int L=t[p].l,R=t[p].r,mid=(L+R)>>1;
            ^
foo.c:67:21: error: 'struct tree' has no member named 'r'
  int L=t[p].l,R=t[p].r,mid=(L+R)>>1;
                     ^
foo.c:68:25: error: incompatible types when returning type 'struct tree' but 'int' was expected
  if(l<=L&&R<=r) return t[p];
                        ~^~~
foo.c:72:2: error: unknown type name 'tree'; use 'struct' keyword to refer to the type
  tree x=ask(ls,l,mid),y=ask(rs,mid+1,r);
  ^~~~
  struct 
foo.c:73:2: error: unknown type name 'tree'; use 'struct' keyword to refer to the type
  tree res;
  ^~~~
  struct 
foo.c:77:6: error: request for member 'f' in something not a structure or union
   res.f[i]=0;
      ^
foo.c:78:28: error: request for member 'f' in something not a structure or union
   for(int k=0;k<=i;++k) res.f[i]=(res.f[i]+((long long)x.f[k]*(long long)y.f[i-k]%mod))%mod;
                            ^
foo.c:78:38: error: request for member 'f' in something not a structure or union
   for(int k=0;k<=i;++k) res.f[i]=(res.f[i]+((long long)x.f[k]*(long long)y.f[i-k]%mod))%mod;
                                      ^
foo.c:78:57: error: request for member 'f' in something not a structure or union
   for(int k=0;k<=i;++k) res.f[i]=(res.f[i]+((long long)x.f[k]*(long long)y.f[i-k]%mod))%mod;
                                                         ^
foo.c:78:75: error: request for member 'f' in something not a structure or union
   for(int k=0;k<=i;++k) res.f[i]=(res.f[i]+((long long)x.f[k]*(long long)y.f[i-k]%mod))%mod;
                                                                           ^
foo.c:72:23: warning: variable 'y' set but not used [-Wunused-but-set-variable]
  tree x=ask(ls,l,mid),y=ask(rs,mid+1,r);
                       ^
foo.c:72:7: warning: variable 'x' set but not used [-Wunused-but-set-variable]
  tree x=ask(ls,l,mid),y=ask(rs,mid+1,r);
       ^
foo.c: In function 'main':
foo.c:100:48: error: request for member 'f' in something not a structure or union
   else {scanf("%d",&x);printf("%d\n",ask(1,l,r).f[x]);}
                                                ^
foo.c:85:2: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
  scanf("%d%d",&n,&q);
  ^~~~~~~~~~~~~~~~~~~
foo.c:91:25: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
  for(int i=1;i<=n;++i) {scanf("%d",a+i);a[i]=(a[i]%mod+mod)%mod;}
                         ^~~~~~~~~~~~~~~
foo.c:96:3: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
   scanf("%s",op);
   ^~~~~~~~~~~~~~
foo.c:97:3: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
   scanf("%d%d",&l,&r);
   ^~~~~~~~~~~~~~~~~~~
foo.c:98:18: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
   if(op[0]=='I'){scanf("%d",&x);change_add(1,l,r,x);}
                  ^~~~~~~~~~~~~~
foo.c:100:9: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
   else {scanf("%d",&x);printf("%d\n",ask(1,l,r).f[x]);}
         ^~~~~~~~~~~~~~
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
序列操作
语言
C
递交时间
2021-07-21 22:20:28
评测时间
2021-07-21 22:20:28
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes