运行 ID: 346420

Main.cc:38:2: error: stray ‘#’ in program
 }#include
  ^
Main.cc: In function ‘int fun(int)’:
Main.cc:6:7: warning: suggest parentheses around ‘+’ inside ‘>>’ [-Wparentheses]
  mid=l+r>>1;
      ~^~
Main.cc: In function ‘int fun2(int)’:
Main.cc:18:7: warning: suggest parentheses around ‘+’ inside ‘>>’ [-Wparentheses]
  mid=l+r>>1;
      ~^~
Main.cc: In function ‘int main()’:
Main.cc:28:5: warning: unused variable ‘s’ [-Wunused-variable]
 int s=0;
     ^
Main.cc: At global scope:
Main.cc:38:3: error: ‘include’ does not name a type
 }#include
   ^~~~~~~
Main.cc:39:34: error: redefinition of ‘int a [100010]’
 using namespace std; int a[100010]; int n,q,x; int fun(int x){
                                  ^
Main.cc:2:26: note: ‘int a [100010]’ previously declared here
 using namespace std; int a[100010]; int n,q,x; int fun(int x){
                          ^
Main.cc:39:41: error: redefinition of ‘int n’
 using namespace std; int a[100010]; int n,q,x; int fun(int x){
                                         ^
Main.cc:2:41: note: ‘int n’ previously declared here
 using namespace std; int a[100010]; int n,q,x; int fun(int x){
                                         ^
Main.cc:39:43: error: redefinition of ‘int q’
 using namespace std; int a[100010]; int n,q,x; int fun(int x){
                                           ^
Main.cc:2:43: note: ‘int q’ previously declared here
 using namespace std; int a[100010]; int n,q,x; int fun(int x){
                                           ^
Main.cc:39:45: error: redefinition of ‘int x’
 using namespace std; int a[100010]; int n,q,x; int fun(int x){
                                             ^
Main.cc:2:45: note: ‘int x’ previously declared here
 using namespace std; int a[100010]; int n,q,x; int fun(int x){
                                             ^
Main.cc: In function ‘int fun(int)’:
Main.cc:39:52: error: redefinition of ‘int fun(int)’
 using namespace std; int a[100010]; int n,q,x; int fun(int x){
                                                    ^~~
Main.cc:2:52: note: ‘int fun(int)’ previously defined here
 using namespace std; int a[100010]; int n,q,x; int fun(int x){
                                                    ^~~
Main.cc:43:7: warning: suggest parentheses around ‘+’ inside ‘>>’ [-Wparentheses]
  mid=l+r>>1;
      ~^~
Main.cc: In function ‘int fun2(int)’:
Main.cc:51:7: error: redefinition of ‘int fun2(int)’
 } int fun2(int x){
       ^~~~
Main.cc:14:7: note: ‘int fun2(int)’ previously defined here
 } int fun2(int x){
       ^~~~
Main.cc:55:7: warning: suggest parentheses around ‘+’ inside ‘>>’ [-Wparentheses]
  mid=l+r>>1;
      ~^~
Main.cc: In function ‘int main()’:
Main.cc:63:7: error: redefinition of ‘int main()’
 } int main(){
       ^~~~
Main.cc:26:7: note: ‘int main()’ previously defined here
 } int main(){
       ^~~~
Main.cc:65:5: warning: unused variable ‘s’ [-Wunused-variable]
 int s=0;
     ^
Main.cc: In function ‘int main()’:
Main.cc:29:6: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
 scanf("%d %d",&n,&q);
 ~~~~~^~~~~~~~~~~~~~~
Main.cc:31:7: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
  scanf("%d",&a[i]);
  ~~~~~^~~~~~~~~~~~
Main.cc:34:7: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
  scanf("%d",&x);
  ~~~~~^~~~~~~~~
Main.cc: In function ‘int main()’:
Main.cc:66:6: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
 scanf("%d %d",&n,&q);
 ~~~~~^~~~~~~~~~~~~~~
Main.cc:68:7: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
  scanf("%d",&a[i]);
  ~~~~~^~~~~~~~~~~~
Main.cc:71:7: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
  scanf("%d",&x);
  ~~~~~^~~~~~~~~