记录详情

Compile Error

foo.cc: In function 'int main()':
foo.cc:7:5: error: expected initializer before 'cin'
     cin >> a >> b;
     ^~~
foo.cc:9:5: error: expected ';' before 'while'
     while c=0 
     ^~~~~
foo.cc:12:19: error: invalid types 'int[int]' for array subscript
         c=c-50*a[0];
                   ^
foo.cc:13:15: warning: comparison of constant '50' with boolean expression is always true [-Wbool-compare]
       if(20<=c<50)
          ~~~~~^~~
foo.cc:13:12: warning: comparisons like 'X<=Y<=Z' do not have their mathematical meaning [-Wparentheses]
       if(20<=c<50)
          ~~^~~
foo.cc:14:12: error: invalid types 'int[int]' for array subscript
         a[1]=c/20;
            ^
foo.cc:13:7: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
       if(20<=c<50)
       ^~
foo.cc:15:9: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
         c=c-20*a[1];
         ^
foo.cc:15:19: error: invalid types 'int[int]' for array subscript
         c=c-20*a[1];
                   ^
foo.cc:16:15: error: expected primary-expression before '>' token
       if(20>c=>10)
               ^
foo.cc:17:12: error: invalid types 'int[int]' for array subscript
         a[2]=c/10;
            ^
foo.cc:16:7: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
       if(20>c=>10)
       ^~
foo.cc:18:9: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
         c=c-10*a[2];
         ^
foo.cc:18:19: error: invalid types 'int[int]' for array subscript
         c=c-10*a[2];
                   ^
foo.cc:19:15: error: expected primary-expression before '>' token
       if(10>c=>5)
               ^
foo.cc:20:12: error: invalid types 'int[int]' for array subscript
         a[3]=c/5;
            ^
foo.cc:19:7: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
       if(10>c=>5)
       ^~
foo.cc:21:9: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
         c=c-5*a[3];
         ^
foo.cc:21:18: error: invalid types 'int[int]' for array subscript
         c=c-5*a[3];
                  ^
foo.cc:22:7: error: 'else' without a previous 'if'
       else 
       ^~~~
foo.cc:23:13: error: invalid types 'int[int]' for array subscript
          a[4]=c;
             ^
foo.cc:25:9: error: 'i' was not declared in this scope
     for(i=0,i<5,i++)
         ^
foo.cc:27:5: error: expected primary-expression before 'return'
     return 0;
     ^~~~~~
foo.cc:27:5: error: expected ';' before 'return'
foo.cc:27:5: error: expected primary-expression before 'return'
foo.cc:27:5: error: expected ')' before 'return'
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
比赛
2021年中北算法竞赛队招新测试
语言
C++
递交时间
2021-10-24 14:40:43
评测时间
2021-10-24 14:40:43
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes