QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#124217#1834. Eulerian?ZhangYiDeCompile Error//C++201.1kb2023-07-14 13:16:532023-07-14 13:16:55

Details

answer.code:4:48: error: ‘std::mt19937 random’ redeclared as different kind of entity
    4 | std::mt19937 random(std::chrono::system_clock::now().time_since_epoch().count());//????
      |                                                ^~~
In file included from /usr/include/c++/11/bits/std_abs.h:38,
                 from /usr/include/c++/11/cmath:47,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:41,
                 from answer.code:1:
/usr/include/stdlib.h:401:17: note: previous declaration ‘long int random()’
  401 | extern long int random (void) __THROW;
      |                 ^~~~~~
In file included from /usr/include/c++/11/bits/stl_algo.h:66,
                 from /usr/include/c++/11/string:52,
                 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/uniform_int_dist.h: In instantiation of ‘std::uniform_int_distribution<_IntType>::result_type std::uniform_int_distribution<_IntType>::operator()(_UniformRandomBitGenerator&, const std::uniform_int_distribution<_IntType>::param_type&) [with _UniformRandomBitGenerator = long int() noexcept; _IntType = int; std::uniform_int_distribution<_IntType>::result_type = int]’:
/usr/include/c++/11/bits/uniform_int_dist.h:193:34:   required from ‘std::uniform_int_distribution<_IntType>::result_type std::uniform_int_distribution<_IntType>::operator()(_UniformRandomBitGenerator&) [with _UniformRandomBitGenerator = long int() noexcept; _IntType = int; std::uniform_int_distribution<_IntType>::result_type = int]’
answer.code:24:23:   required from here
/usr/include/c++/11/bits/uniform_int_dist.h:280:66: error: ‘long int() noexcept’ is not a class, struct, or union type
  280 |         typedef typename _UniformRandomBitGenerator::result_type _Gresult_type;
      |                                                                  ^~~~~~~~~~~~~
/usr/include/c++/11/bits/uniform_int_dist.h:282:68: error: ‘long int() noexcept’ is not a class, struct, or union type
  282 |         typedef typename common_type<_Gresult_type, __utype>::type __uctype;
      |                                                                    ^~~~~~~~