记录详情

Compile Error

/in/foo.cc:3:31: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
 int n,s,a[10000],x=1,y=n,mid=x+y>>1;
                              ~^~
/in/foo.cc: In function 'void qwe()':
/in/foo.cc:30:1: error: expected initializer before '}' token
 }
 ^
/in/foo.cc: At global scope:
/in/foo.cc:31:12: error: expected constructor, destructor, or type conversion before ';' token
      init();
            ^
/in/foo.cc:32:7: error: expected constructor, destructor, or type conversion before ';' token
  qwe();
       ^
/in/foo.cc:33:5: error: expected unqualified-id before 'if'
     if(a[mid]!=s) cout<<-1;
     ^~
/in/foo.cc:34:5: error: expected unqualified-id before 'return'
     return 0;
     ^~~~~~
/in/foo.cc:35:1: error: expected declaration before '}' token
 }
 ^

信息

递交者
类型
递交
题目
二分查找(binary)
题目数据
下载
语言
C++
递交时间
2019-07-03 11:36:47
评测时间
2020-07-10 15:27:09
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes