记录详情

Compile Error

foo.cc: In function 'void winner(int, int, long long int*, std::vector<int>&)':
foo.cc:9:2: error: expected ';' before 'else'
  else if(a[n1]<a[n2])
  ^~~~
foo.cc:18:23: error: expected primary-expression before ']' token
  winner(n1+=2,n2+=2,a[],win);
                       ^
foo.cc: In function 'int main()':
foo.cc:31:17: error: invalid conversion from 'long long int' to 'long long int*' [-fpermissive]
   winner(1,2,a[n],win);
              ~~~^
foo.cc:5:6: note:   initializing argument 3 of 'void winner(int, int, long long int*, std::vector<int>&)'
 void winner(int n1,int n2,long long a[],vector<int> &win)
      ^~~~~~
foo.cc:34:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   for(int i=0;i<win.size();i++)
               ~^~~~~~~~~~~
foo.cc:37:13: error: no match for call to '(std::vector<int>) (int)'
  cout<<win(1)<<"\n"<<win(2)<<endl;
             ^
foo.cc:37:27: error: no match for call to '(std::vector<int>) (int)'
  cout<<win(1)<<"\n"<<win(2)<<endl;
                           ^
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
P1297 D. Jabberwocky
比赛
南京师范大学2021年11月程序设计竞赛
语言
C++
递交时间
2021-11-21 14:26:37
评测时间
2021-11-21 14:26:37
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes