QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#502318#9156. 百万富翁gg_gong#Compile Error//C++142.3kb2024-08-03 03:38:572024-08-03 03:38:57

详细

answer.code: In function ‘int solve_real(int)’:
answer.code:41:43: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   41 |                                 if(j-num*i!=rando){
      |                                    ~~~~~~~^~~~~~~
answer.code:42:64: error: invalid conversion from ‘int*’ to ‘std::vector<int>::size_type’ {aka ‘long unsigned int’} [-fpermissive]
   42 |                                         leftpart.push_back(vec[rando]);
      |                                                                ^~~~~
      |                                                                |
      |                                                                int*
In file included from /usr/include/c++/13/vector:66,
                 from /usr/include/c++/13/queue:63,
                 from /usr/include/x86_64-linux-gnu/c++/13/bits/stdc++.h:157,
                 from answer.code:6:
/usr/include/c++/13/bits/stl_vector.h:1123:28: note:   initializing argument 1 of ‘std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::operator[](size_type) [with _Tp = int; _Alloc = std::allocator<int>; reference = int&; size_type = long unsigned int]’
 1123 |       operator[](size_type __n) _GLIBCXX_NOEXCEPT
      |                  ~~~~~~~~~~^~~
answer.code:60:51: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   60 |                                         if(j-num*i!=rando&&in[vec[j]])
      |                                            ~~~~~~~^~~~~~~
answer.code: In function ‘int solve_small(int)’:
answer.code:27:1: warning: control reaches end of non-void function [-Wreturn-type]
   27 | }
      | ^