QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#579744#8769. Champernowne Substringucup-team4752#Compile Error//C++201.5kb2024-09-21 17:39:152024-09-21 17:39:15

Details

answer.code: In function ‘void upd1(long long int, int, int)’:
answer.code:14:16: error: return-statement with a value, in function returning ‘void’ [-fpermissive]
   14 |         return x;
      |                ^
answer.code: In function ‘void upd2(long long int, int)’:
answer.code:27:16: error: return-statement with a value, in function returning ‘void’ [-fpermissive]
   27 |         return x;
      |                ^
answer.code: In function ‘void randomAction(long long int)’:
answer.code:31:19: error: ‘rng’ was not declared in this scope
   31 |         int typ = rng()%4;
      |                   ^~~
answer.code:33:25: error: expected primary-expression before ‘)’ token
   33 |                 upd1(x, )
      |                         ^
answer.code: In function ‘int main()’:
answer.code:61:29: error: lvalue required as increment operand
   61 |         for (int i = 0; i < 30 ++i) {
      |                             ^~
answer.code:61:34: error: expected ‘;’ before ‘i’
   61 |         for (int i = 0; i < 30 ++i) {
      |                                  ^
      |                                  ;
answer.code:72:16: error: no matching function for call to ‘std::queue<std::pair<long long int, std::__cxx11::basic_string<char> > >::push(long long int&)’
   72 |         q1.push(bg);
      |         ~~~~~~~^~~~
In file included from /usr/include/c++/13/queue:66,
                 from /usr/include/x86_64-linux-gnu/c++/13/bits/stdc++.h:157,
                 from answer.code:1:
/usr/include/c++/13/bits/stl_queue.h:285:7: note: candidate: ‘void std::queue<_Tp, _Sequence>::push(const value_type&) [with _Tp = std::pair<long long int, std::__cxx11::basic_string<char> >; _Sequence = std::deque<std::pair<long long int, std::__cxx11::basic_string<char> >, std::allocator<std::pair<long long int, std::__cxx11::basic_string<char> > > >; value_type = std::pair<long long int, std::__cxx11::basic_string<char> >]’
  285 |       push(const value_type& __x)
      |       ^~~~
/usr/include/c++/13/bits/stl_queue.h:285:30: note:   no known conversion for argument 1 from ‘long long int’ to ‘const std::queue<std::pair<long long int, std::__cxx11::basic_string<char> > >::value_type&’ {aka ‘const std::pair<long long int, std::__cxx11::basic_string<char> >&’}
  285 |       push(const value_type& __x)
      |            ~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/13/bits/stl_queue.h:290:7: note: candidate: ‘void std::queue<_Tp, _Sequence>::push(value_type&&) [with _Tp = std::pair<long long int, std::__cxx11::basic_string<char> >; _Sequence = std::deque<std::pair<long long int, std::__cxx11::basic_string<char> >, std::allocator<std::pair<long long int, std::__cxx11::basic_string<char> > > >; value_type = std::pair<long long int, std::__cxx11::basic_string<char> >]’
  290 |       push(value_type&& __x)
      |       ^~~~
/usr/include/c++/13/bits/stl_queue.h:290:25: note:   no known conversion for argument 1 from ‘long long int’ to ‘std::queue<std::pair<long long int, std::__cxx11::basic_string<char> > >::value_type&&’ {aka ‘std::pair<long long int, std::__cxx11::basic_string<char> >&&’}
  290 |       push(value_type&& __x)
      |            ~~~~~~~~~~~~~^~~
answer.code:73:9: error: ‘q2’ was not declared in this scope; did you mean ‘q1’?
   73 |         q2.push(en);
      |         ^~
      |         q1
answer.code:77:36: error: ‘class std::queue<std::pair<long long int, std::__cxx11::basic_string<char> > >’ has no member named ‘top’; did you mean ‘pop’?
   77 |                         int x = q1.top();
      |                                    ^~~
      |                                    pop