/ new_bzoj /

记录详情

Compile Error

foo.cc:5:21: error: stray '#' in program
    5 | using namespace std;#include<iostream>
      |                     ^
foo.cc:10: warning: "maxn" redefined
   10 | #define maxn 1000119
      | 
foo.cc:3: note: this is the location of the previous definition
    3 | #define maxn 10001
      | 
foo.cc:5:22: error: 'include' does not name a type
    5 | using namespace std;#include<iostream>
      |                      ^~~~~~~
foo.cc:92:5: error: redefinition of 'int num [1000119]'
   92 | int num[maxn],c[maxn],is[maxn],ans[maxn],n,x;
      |     ^~~
foo.cc:11:5: note: 'int num [1000119]' previously declared here
   11 | int num[maxn],tree[maxn],booll[maxn],nnn[maxn],N,ww;
      |     ^~~
foo.cc:106:12: error: redefinition of 'int lowbit(int)'
  106 | inline int lowbit(int x)
      |            ^~~~~~
foo.cc:25:5: note: 'int lowbit(int)' previously defined here
   25 | int lowbit(int n)
      |     ^~~~~~
foo.cc:110:13: error: redefinition of 'void add(int, int)'
  110 | inline void add(int x,int y)
      |             ^~~
foo.cc:30:6: note: 'void add(int, int)' previously defined here
   30 | void add(int n,int now)
      |      ^~~
foo.cc:128:5: error: redefinition of 'int main()'
  128 | int main()
      |     ^~~~
foo.cc:50:5: note: 'int main()' previously defined here
   50 | int main()
      |     ^~~~
foo.cc: In function 'int main()':
foo.cc:143:28: error: no matching function for call to 'sort(node*, node*, <unresolved overloaded function type>)'
  143 |  sort(sz + 1,sz + x + 1,cmp);
      |                            ^
In file included from /usr/include/c++/9/algorithm:62,
                 from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:65,
                 from foo.cc:1:
/usr/include/c++/9/bits/stl_algo.h:4857:5: note: candidate: 'template<class _RAIter> void std::sort(_RAIter, _RAIter)'
 4857 |     sort(_RandomAccessIterator __first, _RandomAccessIterator __last)
      |     ^~~~
/usr/include/c++/9/bits/stl_algo.h:4857:5: note:   template argument deduction/substitution failed:
foo.cc:143:28: note:   candidate expects 2 arguments, 3 provided
  143 |  sort(sz + 1,sz + x + 1,cmp);
      |                            ^
In file included from /usr/include/c++/9/algorithm:62,
                 from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:65,
                 from foo.cc:1:
/usr/include/c++/9/bits/stl_algo.h:4887:5: note: candidate: 'template<class _RAIter, class _Compare> void std::sort(_RAIter, _RAIter, _Compare)'
 4887 |     sort(_RandomAccessIterator __first, _RandomAccessIterator __last,
      |     ^~~~
/usr/include/c++/9/bits/stl_algo.h:4887:5: note:   template argument deduction/substitution failed:
foo.cc:143:28: note:   couldn't deduce template parameter '_Compare'
  143 |  sort(sz + 1,sz + x + 1,cmp);
      |                            ^
foo.cc: In function 'int main()':
foo.cc:52:14: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   52 |         scanf("%d",&N);
      |         ~~~~~^~~~~~~~~
foo.cc:54:18: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   54 |             scanf("%d",&num[i]);
      |             ~~~~~^~~~~~~~~~~~~~
foo.cc:55:14: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   55 |         scanf("%d",&ww);
      |         ~~~~~^~~~~~~~~~
foo.cc:58:18: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   58 |             scanf("%d%d",&ask[i].l,&ask[i].r);
      |             ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
HH的项链
语言
C++
递交时间
2022-01-19 14:52:49
评测时间
2022-01-19 14:52:49
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes