/ Vijos /

记录详情

Compile Error

foo.cc:13:45: error: empty character constant
      for(;isdigit(ch);ch=getchar()) x=x*+ch-'';
                                             ^~
foo.cc: In function 'int read()':
foo.cc:11:12: error: expected primary-expression before ',' token
      int x=,f=;char ch=getchar();
            ^
foo.cc:12:50: error: 'f' was not declared in this scope
      for(;!isdigit(ch);ch=getchar()) if(ch=='-') f=-;
                                                  ^
foo.cc:12:53: error: expected primary-expression before ';' token
      for(;!isdigit(ch);ch=getchar()) if(ch=='-') f=-;
                                                     ^
foo.cc:14:15: error: 'f' was not declared in this scope
      return x*f;
               ^
foo.cc: In function 'unsigned int rng61()':
foo.cc:20:18: error: expected primary-expression before ';' token
      SA ^= SA << ;SA ^= SA >> ;SA ^= SA << ;
                  ^
foo.cc:20:31: error: expected primary-expression before ';' token
      SA ^= SA << ;SA ^= SA >> ;SA ^= SA << ;
                               ^
foo.cc:20:44: error: expected primary-expression before ';' token
      SA ^= SA << ;SA ^= SA >> ;SA ^= SA << ;
                                            ^
foo.cc: In function 'void gen()':
foo.cc:28:18: error: expected primary-expression before ';' token
      for(int i = ; i <= p; i++)scanf("%d%d", &a[i], &b[i]);
                  ^
foo.cc:29:22: error: expected primary-expression before ';' token
      for(int i = p + ; i <= n; i++){
                      ^
foo.cc:30:31: error: expected primary-expression before ';' token
          a[i] = rng61() % A + ;
                               ^
foo.cc:31:31: error: expected primary-expression before ';' token
          b[i] = rng61() % B + ;
                               ^
foo.cc: At global scope:
foo.cc:34:9: error: declaration of 'g' as multidimensional array must have bounds for all dimensions except the first
  ll g[][],f[][],sum[];
         ^
foo.cc:34:15: error: declaration of 'f' as multidimensional array must have bounds for all dimensions except the first
  ll g[][],f[][],sum[];
               ^
foo.cc:34:17: error: storage size of 'sum' isn't known
  ll g[][],f[][],sum[];
                 ^~~
foo.cc: In function 'void init()':
foo.cc:37:13: error: 'g' was not declared in this scope
      memset(g,,sizeof(g));
             ^
foo.cc:37:15: error: expected primary-expression before ',' token
      memset(g,,sizeof(g));
               ^
foo.cc:38:17: error: expected primary-expression before ',' token
      memset(sum,,sizeof(sum));
                 ^
foo.cc:39:13: error: 'f' was not declared in this scope
      memset(f,,sizeof(f));
             ^
foo.cc:39:15: error: expected primary-expression before ',' token
      memset(f,,sizeof(f));
               ^
foo.cc: In function 'int main()':
foo.cc:45:15: error: expected primary-expression before '<<' token
          lim=(<<k)-;
               ^~
foo.cc:45:20: error: expected primary-expression before ';' token
          lim=(<<k)-;
                    ^
foo.cc:46:16: error: expected primary-expression before ';' token
          int l=;
                ^
foo.cc:47:20: error: expected primary-expression before ';' token
          for(int i=;i<=n;i++) {
                    ^
foo.cc:52:14: error: 'g' was not declared in this scope
              g[j][]+=(m-a[i])*b[i];
              ^
foo.cc:52:19: error: expected primary-expression before ']' token
              g[j][]+=(m-a[i])*b[i];
                   ^
foo.cc:55:20: error: expected primary-expression before ';' token
          for(int i=;i<=lim;i++)
                    ^
foo.cc:56:24: error: expected primary-expression before ';' token
              for(int j=;j<m;j++) g[i][j]+=g[i][j-]+sum[i];
                        ^
foo.cc:56:34: error: 'g' was not declared in this scope
              for(int j=;j<m;j++) g[i][j]+=g[i][j-]+sum[i];
                                  ^
foo.cc:56:50: error: expected primary-expression before ']' token
              for(int j=;j<m;j++) g[i][j]+=g[i][j-]+sum[i];
                                                  ^
foo.cc:57:27: error: expected primary-expression before ';' token
          for(int i=lim;i>=;i--) {
                           ^
foo.cc:58:19: error: expected primary-expression before '>' token
              if(i*>lim) {
                   ^
foo.cc:59:28: error: expected primary-expression before ';' token
                  for(int j=;j<m;j++) f[i][j]=g[i][j];
                            ^
foo.cc:59:38: error: 'f' was not declared in this scope
                  for(int j=;j<m;j++) f[i][j]=g[i][j];
                                      ^
foo.cc:59:46: error: 'g' was not declared in this scope
                  for(int j=;j<m;j++) f[i][j]=g[i][j];
                                              ^
foo.cc:62:24: error: expected primary-expression before ';' token
              for(int j=;j<m;j++) {
                        ^
foo.cc:63:18: error: 'f' was not declared in this scope
                  f[i][j]=214748364700000000ll;
                  ^
foo.cc:64:28: error: expected primary-expression before ';' token
                  for(int k=;k<m;k++) {
                            ^
foo.cc:65:39: error: expected primary-expression before '?' token
                      int tt=j-k;tt=tt<?tt+m:tt;
                                       ^
foo.cc:66:47: error: expected primary-expression before ']' token
                      f[i][j]=min(f[i][j],f[i<<][tt]+f[(i<<)+][tt]+g[i][k]);
                                               ^
foo.cc:66:59: error: expected primary-expression before ')' token
                      f[i][j]=min(f[i][j],f[i<<][tt]+f[(i<<)+][tt]+g[i][k]);
                                                           ^
foo.cc:66:61: error: expected primary-expression before ']' token
                      f[i][j]=min(f[i][j],f[i<<][tt]+f[(i<<)+][tt]+g[i][k]);
                                                             ^
foo.cc:66:67: error: 'g' was not declared in this scope
                      f[i][j]=min(f[i][j],f[i<<][tt]+f[(i<<)+][tt]+g[i][k]);
                                                                   ^
foo.cc:70:26: error: 'f' was not declared in this scope
          printf("%lld\n",f[][]);
                          ^
foo.cc:70:28: error: expected primary-expression before ']' token
          printf("%lld\n",f[][]);
                            ^
foo.cc:70:30: error: expected primary-expression before ']' token
          printf("%lld\n",f[][]);
                              ^
foo.cc: In function 'void gen()':
foo.cc:27:11: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
      scanf("%u%u%u%d%d",&SA, &SB, &SC, &A, &B);
      ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
foo.cc:28:37: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
      for(int i = ; i <= p; i++)scanf("%d%d", &a[i], &b[i]);
                                ~~~~~^~~~~~~~~~~~~~~~~~~~~~
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
P2050 荣誉称号
语言
C++
递交时间
2021-08-08 20:24:57
评测时间
2021-08-08 20:24:57
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes