QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#432740#7281. How to Avoid Disqualification in 75 Easy Stepsegypt_ioi2024_05#Compile Error//C++20662b2024-06-07 16:29:292024-06-07 16:29:30

Details

answer.code: In function ‘std::pair<int, int> scout(int, int)’:
answer.code:5:20: error: declaration of ‘int r’ shadows a parameter
    5 |         int l = 1, r = 1000;
      |                    ^
answer.code:4:28: note: ‘int r’ previously declared here
    4 | pair <int, int> scout (int r, int h) {
      |                        ~~~~^
answer.code:11:36: error: no matching function for call to ‘std::vector<int>::push_back(std::vector<int>&)’
   11 |                         g.push_back(g);
      |                         ~~~~~~~~~~~^~~
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 = int; _Alloc = std::allocator<int>; value_type = int]’
 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 ‘std::vector<int>’ to ‘const std::vector<int>::value_type&’ {aka ‘const int&’}
 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 = int; _Alloc = std::allocator<int>; value_type = int]’
 1295 |       push_back(value_type&& __x)
      |       ^~~~~~~~~
/usr/include/c++/13/bits/stl_vector.h:1295:30: note:   no known conversion for argument 1 from ‘std::vector<int>’ to ‘std::vector<int>::value_type&&’ {aka ‘int&&’}
 1295 |       push_back(value_type&& __x)
      |                 ~~~~~~~~~~~~~^~~
answer.code:25:36: error: no matching function for call to ‘std::vector<int>::push_back(std::vector<int>&)’
   25 |                         g.push_back(g);
      |                         ~~~~~~~~~~~^~~
/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 = int; _Alloc = std::allocator<int>; value_type = int]’
 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 ‘std::vector<int>’ to ‘const std::vector<int>::value_type&’ {aka ‘const int&’}
 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 = int; _Alloc = std::allocator<int>; value_type = int]’
 1295 |       push_back(value_type&& __x)
      |       ^~~~~~~~~
/usr/include/c++/13/bits/stl_vector.h:1295:30: note:   no known conversion for argument 1 from ‘std::vector<int>’ to ‘std::vector<int>::value_type&&’ {aka ‘int&&’}
 1295 |       push_back(value_type&& __x)
      |                 ~~~~~~~~~~~~~^~~