QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#533868#8069. Don't Be FakeMaMengQiCompile Error//C++201.0kb2024-08-26 15:43:052024-08-26 15:43:07

Details

answer.code:14:14: error: ‘int time [86405]’ redeclared as different kind of entity
   14 | int time[TIME];
      |              ^
In file included from /usr/include/pthread.h:23,
                 from /usr/include/x86_64-linux-gnu/c++/13/bits/gthr-default.h:35,
                 from /usr/include/x86_64-linux-gnu/c++/13/bits/gthr.h:148,
                 from /usr/include/c++/13/ext/atomicity.h:35,
                 from /usr/include/c++/13/bits/ios_base.h:39,
                 from /usr/include/c++/13/ios:44,
                 from /usr/include/c++/13/ostream:40,
                 from /usr/include/c++/13/iostream:41,
                 from answer.code:2:
/usr/include/time.h:75:15: note: previous declaration ‘time_t time(time_t*)’
   75 | extern time_t time (time_t *__timer) __THROW;
      |               ^~~~
answer.code: In function ‘int main()’:
answer.code:39:29: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   39 |                     ++time[t];
      |                             ^
answer.code:39:29: warning: ISO C++ forbids incrementing a pointer of type ‘time_t (*)(time_t*) noexcept’ {aka ‘long int (*)(long int*) noexcept’} [-Wpointer-arith]
   39 |                     ++time[t];
      |                       ~~~~~~^
answer.code:39:29: error: lvalue required as increment operand
   39 |                     ++time[t];
      |                             ^
answer.code:40:42: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   40 |                     ans = max(ans, time[t]);
      |                                          ^
answer.code:40:30: error: no matching function for call to ‘max(int&, time_t (&)(time_t*) noexcept)’
   40 |                     ans = max(ans, time[t]);
      |                           ~~~^~~~~~~~~~~~~~
In file included from /usr/include/c++/13/string:51,
                 from /usr/include/c++/13/bits/locale_classes.h:40,
                 from /usr/include/c++/13/bits/ios_base.h:41:
/usr/include/c++/13/bits/stl_algobase.h:257:5: note: candidate: ‘template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)’
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/13/bits/stl_algobase.h:257:5: note:   template argument deduction/substitution failed:
answer.code:40:30: note:   deduced conflicting types for parameter ‘const _Tp’ (‘int’ and ‘time_t(time_t*) noexcept’ {aka ‘long int(long int*) noexcept’})
   40 |                     ans = max(ans, time[t]);
      |                           ~~~^~~~~~~~~~~~~~
/usr/include/c++/13/bits/stl_algobase.h:303:5: note: candidate: ‘template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)’
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/13/bits/stl_algobase.h:303:5: note:   template argument deduction/substitution failed:
answer.code:40:30: note:   deduced conflicting types for parameter ‘const _Tp’ (‘int’ and ‘time_t(time_t*) noexcept’ {aka ‘long int(long int*) noexcept’})
   40 |                     ans = max(ans, time[t]);
      |                           ~~~^~~~~~~~~~~~~~
In file included from /usr/include/c++/13/algorithm:61,
                 from answer.code:3:
/usr/include/c++/13/bits/stl_algo.h:5795:5: note: candidate: ‘template<class _Tp> constexpr _Tp std::max(initializer_list<_Tp>)’
 5795 |     max(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/13/bits/stl_algo.h:5795:5: note:   template argument deduction/substitution failed:
answer.code:40:30: note:   mismatched types ‘std::initializer_list<_Tp>’ and ‘int’
   40 |                     ans = max(ans, time[t]);
      |                           ~~~^~~~~~~~~~~~~~
/usr/include/c++/13/bits/stl_algo.h:5805:5: note: candidate: ‘template<class _Tp, class _Compare> constexpr _Tp std::max(initializer_list<_Tp>, _Compare)’
 5805 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/13/bits/stl_algo.h:5805:5: note:   template argument deduction/substitution failed:
answer.code:40:30: note:   mismatched types ‘std::initializer_list<_Tp>’ and ‘int’
   40 |                     ans = max(ans, time[t]);
      |                           ~~~^~~~~~~~~~~~~~
answer.code:49:18: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   49 |         if(time[t] == ans) ++val;
      |                  ^
answer.code:49:20: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   49 |         if(time[t] == ans) ++val;
      |            ~~~~~~~~^~~~~~