QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#77072#5218. 字符串sdoiCompile Error//C++203.4kb2023-02-13 01:08:152023-02-13 01:08:18

详细

answer.code: In function ‘int read()’:
answer.code:12:22: warning: ISO C++17 does not allow ‘register’ storage class specifier [-Wregister]
   12 |         register int data=0,w=1;
      |                      ^~~~
answer.code:12:29: warning: ISO C++17 does not allow ‘register’ storage class specifier [-Wregister]
   12 |         register int data=0,w=1;
      |                             ^
answer.code: In function ‘int main()’:
answer.code:119:9: error: reference to ‘size’ is ambiguous
  119 |         size=sqrt(n);N=n/size;
      |         ^~~~
In file included from /usr/include/c++/11/string:54,
                 from /usr/include/c++/11/bits/locale_classes.h:40,
                 from /usr/include/c++/11/bits/ios_base.h:41,
                 from /usr/include/c++/11/ios:42,
                 from /usr/include/c++/11/istream:38,
                 from /usr/include/c++/11/sstream:38,
                 from /usr/include/c++/11/complex:45,
                 from /usr/include/c++/11/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:54,
                 from answer.code:1:
/usr/include/c++/11/bits/range_access.h:254:5: note: candidates are: ‘template<class _Tp, long unsigned int _Nm> constexpr std::size_t std::size(const _Tp (&)[_Nm])’
  254 |     size(const _Tp (&)[_Nm]) noexcept
      |     ^~~~
/usr/include/c++/11/bits/range_access.h:245:5: note:                 ‘template<class _Container> constexpr decltype (__cont.size()) std::size(const _Container&)’
  245 |     size(const _Container& __cont) noexcept(noexcept(__cont.size()))
      |     ^~~~
answer.code:22:22: note:                 ‘int size’
   22 | int st[o],ed[o],b[o],size,N,ad[o],a[o];
      |                      ^~~~
answer.code:119:26: error: reference to ‘size’ is ambiguous
  119 |         size=sqrt(n);N=n/size;
      |                          ^~~~
In file included from /usr/include/c++/11/string:54,
                 from /usr/include/c++/11/bits/locale_classes.h:40,
                 from /usr/include/c++/11/bits/ios_base.h:41,
                 from /usr/include/c++/11/ios:42,
                 from /usr/include/c++/11/istream:38,
                 from /usr/include/c++/11/sstream:38,
                 from /usr/include/c++/11/complex:45,
                 from /usr/include/c++/11/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:54,
                 from answer.code:1:
/usr/include/c++/11/bits/range_access.h:254:5: note: candidates are: ‘template<class _Tp, long unsigned int _Nm> constexpr std::size_t std::size(const _Tp (&)[_Nm])’
  254 |     size(const _Tp (&)[_Nm]) noexcept
      |     ^~~~
/usr/include/c++/11/bits/range_access.h:245:5: note:                 ‘template<class _Container> constexpr decltype (__cont.size()) std::size(const _Container&)’
  245 |     size(const _Container& __cont) noexcept(noexcept(__cont.size()))
      |     ^~~~
answer.code:22:22: note:                 ‘int size’
   22 | int st[o],ed[o],b[o],size,N,ad[o],a[o];
      |                      ^~~~
answer.code:120:43: error: reference to ‘size’ is ambiguous
  120 |         FOR(i,1,N)st[i]=ed[i-1]+1,ed[i]=i*size;
      |                                           ^~~~
In file included from /usr/include/c++/11/string:54,
                 from /usr/include/c++/11/bits/locale_classes.h:40,
                 from /usr/include/c++/11/bits/ios_base.h:41,
                 from /usr/include/c++/11/ios:42,
                 from /usr/include/c++/11/istream:38,
                 from /usr/include/c++/11/sstream:38,
                 from /usr/include/c++/11/complex:45,
                 from /usr/include/c++/11/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:54,
                 from answer.code:1:
/usr/include/c++/11/bits/range_access.h:254:5: note: candidates are: ‘template<class _Tp, long unsigned int _Nm> constexpr std::size_t std::size(const _Tp (&)[_Nm])’
  254 |     size(const _Tp (&)[_Nm]) noexcept
      |     ^~~~
/usr/include/c++/11/bits/range_access.h:245:5: note:                 ‘template<class _Container> constexpr decltype (__cont.size()) std::size(const _Container&)’
  245 |     size(const _Container& __cont) noexcept(noexcept(__cont.size()))
      |     ^~~~
answer.code:22:22: note:                 ‘int size’
   22 | int st[o],ed[o],b[o],size,N,ad[o],a[o];
      |                      ^~~~
answer.code:121:12: error: reference to ‘size’ is ambiguous
  121 |         if(size*N<n)++N,st[N]=ed[N-1]+1,ed[N]=n;
      |            ^~~~
In file included from /usr/include/c++/11/string:54,
                 from /usr/include/c++/11/bits/locale_classes.h:40,
                 from /usr/include/c++/11/bits/ios_base.h:41,
                 from /usr/include/c++/11/ios:42,
                 from /usr/include/c++/11/istream:38,
                 from /usr/include/c++/11/sstream:38,
                 from /usr/include/c++/11/complex:45,
                 from /usr/include/c++/11/ccomplex:39,...