QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#314310#5516. Modern MachinehyforcesCompile Error//C++203.7kb2024-01-25 15:30:552024-01-25 15:30:56

详细

answer.code: In function ‘int main()’:
answer.code:104:112: error: expression list treated as compound expression in initializer [-fpermissive]
  104 |                 int x=(u+rg.v)%(n+1),p=lower_bound(vr.begin(),vr.end(),x)-vr.begin(),min(vr[p].en-x+1,rg.en-u+1);
      |                                                                                                                ^
answer.code:105:38: error: ‘l’ was not declared in this scope
  105 |                 st[a].push_back({(u+=l)-1,(rg.v+vr[p].v)%(n+1)});
      |                                      ^
answer.code:105:32: error: no matching function for call to ‘std::vector<ev>::push_back(<brace-enclosed initializer list>)’
  105 |                 st[a].push_back({(u+=l)-1,(rg.v+vr[p].v)%(n+1)});
      |                 ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/13/vector:66,
                 from /usr/include/c++/13/functional:64,
                 from /usr/include/x86_64-linux-gnu/c++/13/bits/stdc++.h:53,
                 from answer.code:1:
/usr/include/c++/13/bits/stl_vector.h:1278:7: note: candidate: ‘constexpr void std::vector<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = ev; _Alloc = std::allocator<ev>; value_type = ev]’
 1278 |       push_back(const value_type& __x)
      |       ^~~~~~~~~
/usr/include/c++/13/bits/stl_vector.h:1278:35: note:   no known conversion for argument 1 from ‘<brace-enclosed initializer list>’ to ‘const std::vector<ev>::value_type&’ {aka ‘const ev&’}
 1278 |       push_back(const value_type& __x)
      |                 ~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/13/bits/stl_vector.h:1295:7: note: candidate: ‘constexpr void std::vector<_Tp, _Alloc>::push_back(value_type&&) [with _Tp = ev; _Alloc = std::allocator<ev>; value_type = ev]’
 1295 |       push_back(value_type&& __x)
      |       ^~~~~~~~~
/usr/include/c++/13/bits/stl_vector.h:1295:30: note:   no known conversion for argument 1 from ‘<brace-enclosed initializer list>’ to ‘std::vector<ev>::value_type&&’ {aka ‘ev&&’}
 1295 |       push_back(value_type&& __x)
      |                 ~~~~~~~~~~~~~^~~