/ Vijos /

记录详情

Compile Error

/in/foo.cc:5:12: error: expected ']' before numeric constant
 int n,c,f[[10010];
            ^~~~~
/in/foo.cc: In function 'void KM()':
/in/foo.cc:8:21: error: invalid conversion from 'int' to 'void*' [-fpermissive]
  memset(f,0,sizeof f);
                     ^
In file included from /in/foo.cc:2:0:
/usr/include/string.h:62:14: note:   initializing argument 1 of 'void* memset(void*, int, size_t)'
 extern void *memset (void *__s, int __c, size_t __n) __THROW __nonnull ((1));
              ^~~~~~
/in/foo.cc:9:36: error: invalid types 'int[int]' for array subscript
  for(int i=0;i<=c;++i) if(i<=n) f[i]=1;
                                    ^
/in/foo.cc:13:6: error: invalid types 'int[int]' for array subscript
   f[j]+=f[j-k*(1<<i)];
      ^
/in/foo.cc:13:21: error: invalid types 'int[int]' for array subscript
   f[j]+=f[j-k*(1<<i)];
                     ^
/in/foo.cc:14:19: error: invalid types 'int[int]' for array subscript
  printf("%d\n",f[n]);
                   ^

信息

递交者
类型
递交
题目
P1932 重要的誓言
语言
C++
递交时间
2017-06-19 21:38:07
评测时间
2017-06-19 21:38:07
评测机
分数
0
总耗时
102ms
峰值内存
14.613 MiB