/ Vijos /

记录详情

Compile Error

/in/foo.cc: In function 'int main()':
/in/foo.cc:14:3: error: expected identifier before 'int'
   int head,tail;
   ^~~
/in/foo.cc:14:11: error: expected ']' before ',' token
   int head,tail;
           ^
/in/foo.cc: In lambda function:
/in/foo.cc:14:11: error: expected '{' before ',' token
/in/foo.cc: In function 'int main()':
/in/foo.cc:14:12: error: 'tail' was not declared in this scope
   int head,tail;
            ^~~~
/in/foo.cc:15:8: error: 'head' was not declared in this scope
   cin>>head>>tail;
        ^~~~
/in/foo.cc:15:14: error: 'tail' was not declared in this scope
   cin>>head>>tail;
              ^~~~
/in/foo.cc:16:19: error: expected ';' before '<=' token
   for(int h=head,h<=tail;h++)
                   ^~
/in/foo.cc:16:19: error: expected primary-expression before '<=' token
/in/foo.cc:20:12: warning: statement has no effect [-Wunused-value]
     tree[h]==1;
     ~~~~~~~^~~
/in/foo.cc:7:6: warning: unused variable 'cnt' [-Wunused-variable]
  int cnt=0;
      ^~~
/in/foo.cc: At global scope:
/in/foo.cc:24:2: error: expected unqualified-id before 'for'
  for(int l=1;l<=k;l++)
  ^~~
/in/foo.cc:24:14: error: 'l' does not name a type
  for(int l=1;l<=k;l++)
              ^
/in/foo.cc:24:19: error: 'l' does not name a type
  for(int l=1;l<=k;l++)
                   ^
/in/foo.cc:29:2: error: 'cout' does not name a type
  cout<<cnt<<endl;
  ^~~~
/in/foo.cc:30:2: error: expected unqualified-id before 'return'
  return 0;
  ^~~~~~
/in/foo.cc:31:1: error: expected declaration before '}' token
 }
 ^

信息

递交者
类型
递交
题目
P1103 校门外的树
语言
C++
递交时间
2017-12-10 07:47:50
评测时间
2017-12-10 07:47:50
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes