QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#607987#7615. Sequence FoldingMaMengQiCompile Error//C++17799b2024-10-03 17:33:322024-10-03 17:33:32

Details

answer.code:10:9: error: ‘vector’ does not name a type
   10 | typedef vector<node> vec;
      |         ^~~~~~
answer.code:11:17: error: ‘vec’ has not been declared
   11 | void Deal(int n,vec F){
      |                 ^~~
answer.code: In function ‘void Deal(long long int, int)’:
answer.code:14:20: error: ‘begin’ was not declared in this scope; did you mean ‘std::begin’?
   14 |         for(node u:F)mp[u.p]=u.c;
      |                    ^
      |                    std::begin
In file included from /usr/include/c++/13/string:53,
                 from /usr/include/c++/13/bits/locale_classes.h:40,
                 from /usr/include/c++/13/bits/ios_base.h:41,
                 from /usr/include/c++/13/ios:44,
                 from /usr/include/c++/13/ostream:40,
                 from /usr/include/c++/13/iostream:41,
                 from answer.code:1:
/usr/include/c++/13/bits/range_access.h:114:37: note: ‘std::begin’ declared here
  114 |   template<typename _Tp> const _Tp* begin(const valarray<_Tp>&) noexcept;
      |                                     ^~~~~
answer.code:14:20: error: ‘end’ was not declared in this scope; did you mean ‘std::end’?
   14 |         for(node u:F)mp[u.p]=u.c;
      |                    ^
      |                    std::end
/usr/include/c++/13/bits/range_access.h:116:37: note: ‘std::end’ declared here
  116 |   template<typename _Tp> const _Tp* end(const valarray<_Tp>&) noexcept;
      |                                     ^~~
answer.code:15:20: error: ‘begin’ was not declared in this scope; did you mean ‘std::begin’?
   15 |         for(node u:F){
      |                    ^
      |                    std::begin
/usr/include/c++/13/bits/range_access.h:114:37: note: ‘std::begin’ declared here
  114 |   template<typename _Tp> const _Tp* begin(const valarray<_Tp>&) noexcept;
      |                                     ^~~~~
answer.code:15:20: error: ‘end’ was not declared in this scope; did you mean ‘std::end’?
   15 |         for(node u:F){
      |                    ^
      |                    std::end
/usr/include/c++/13/bits/range_access.h:116:37: note: ‘std::end’ declared here
  116 |   template<typename _Tp> const _Tp* end(const valarray<_Tp>&) noexcept;
      |                                     ^~~
answer.code:27:11: error: request for member ‘clear’ in ‘F’, which is of non-class type ‘int’
   27 |         F.clear();
      |           ^~~~~
answer.code:29:39: error: request for member ‘push_back’ in ‘F’, which is of non-class type ‘int’
   29 |                 if(PI.first<=(n>>1))F.push_back((node){PI.first,PI.second});
      |                                       ^~~~~~~~~
answer.code: In function ‘int main()’:
answer.code:35:17: error: ‘vec’ was not declared in this scope
   35 |         int i,x;vec F;F.clear();
      |                 ^~~
answer.code:35:23: error: ‘F’ was not declared in this scope
   35 |         int i,x;vec F;F.clear();
      |                       ^
answer.code:34:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   34 |         scanf("%lld%lld",&n,&m);
      |         ~~~~~^~~~~~~~~~~~~~~~~~