# 1번째 컴파일 단계
Alice.cpp: In function 'long long int Rand(long long int, long long int)':
Alice.cpp:27:19: error: no match for 'operator%' (operand types are 'std::mt19937_64' {aka 'std::mersenne_twister_engine<long unsigned int, 64, 312, 156, 31, 13043109905998158313, 29, 6148914691236517205, 17, 8202884508482404352, 37, 18444473444759240704, 43, 6364136223846793005>'} and 'long long int')
27 | return l + (rd%(r - l + 1) + r - l + 1)%(r - l + 1);
| ~~^~~~~~~~~~~~
| | |
| | long long int
| std::mt19937_64 {aka std::mersenne_twister_engine<long unsigned int, 64, 312, 156, 31, 13043109905998158313, 29, 6148914691236517205, 17, 8202884508482404352, 37, 18444473444759240704, 43, 6364136223846793005>}
In file included from /usr/include/c++/11/valarray:603,
from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:95,
from Alice.cpp:4:
/usr/include/c++/11/bits/valarray_after.h:409:5: note: candidate: 'template<class _Dom1, class _Dom2> std::_Expr<std::__detail::_BinClos<std::__modulus, std::_Expr, std::_Expr, _Dom1, _Dom2>, typename std::__fun<std::__modulus, typename _Dom1::value_type>::result_type> std::operator%(const std::_Expr<_Dom1, typename _Dom1::value_type>&, const std::_Expr<_Dom2, typename _Dom2::value_type>&)'
409 | _DEFINE_EXPR_BINARY_OPERATOR(%, struct std::__modulus)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/11/bits/valarray_after.h:409:5: note: template argument deduction/substitution failed:
Alice.cpp:27:30: note: 'std::mt19937_64' {aka 'std::mersenne_twister_engine<long unsigned int, 64, 312, 156, 31, 13043109905998158313, 29, 6148914691236517205, 17, 8202884508482404352, 37, 18444473444759240704, 43, 6364136223846793005>'} is not derived from 'const std::_Expr<_Dom1, typename _Dom1::value_type>'
27 | return l + (rd%(r - l + 1) + r - l + 1)%(r - l + 1);
| ^
In file included from /usr/include/c++/11/valarray:603,
from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:95,
from Alice.cpp:4:
/usr/include/c++/11/bits/valarray_after.h:409:5: note: candidate: 'template<class _Dom> std::_Expr<std::__detail::_BinClos<std::__modulus, std::_Expr, std::_Constant, _Dom, typename _Dom::value_type>, typename std::__fun<std::__modulus, typename _Dom1::value_type>::result_type> std::operator%(const std::_Expr<_Dom1, typename _Dom1::value_type>&, const typename _Dom::value_type&)'
409 | _DEFINE_EXPR_BINARY_OPERATOR(%, struct std::__modulus)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/11/bits/valarray_after.h:409:5: note: template argument deduction/substitution failed:
Alice.cpp:27:30: note: 'std::mt19937_64' {aka 'std::mersenne_twister_engine<long unsigned int, 64, 312, 156, 31, 13043109905998158313, 29, 6148914691236517205, 17, 8202884508482404352, 37, 18444473444759240704, 43, 6364136223846793005>'} is not derived from 'const std::_Expr<_Dom1, typename _Dom1::value_type>'
27 | return l + (rd%(r - l + 1) + r - l + 1)%(r - l + 1);
| ^
In file included from /usr/include/c++/11/valarray:603,
from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:95,
from Alice.cpp:4:
/usr/include/c++/11/bits/valarray_after.h:409:5: note: candidate: 'template<class _Dom> std::_Expr<std::__detail::_BinClos<std::__modulus, std::_Constant, std::_Expr, typename _Dom::value_type, _Dom>, typename std::__fun<std::__modulus, typename _Dom1::value_type>::result_type> std::operator%(const typename _Dom::value_type&, const std::_Expr<_Dom1, typename _Dom1::value_type>&)'
409 | _DEFINE_EXPR_BINARY_OPERATOR(%, struct std::__modulus)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/11/bits/valarray_after.h:409:5: note: template argument deduction/substitution failed:
Alice.cpp:27:30: note: mismatched types 'const std::_Expr<_Dom1, typename _Dom1::value_type>' and 'long long int'
27 | return l + (rd%(r - l + 1) + r - l + 1)%(r - l + 1);
| ^
In file included from /usr/include/c++/11/valarray:603,
from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:95,
from Alice.cpp:4:
/usr/include/c++/11/bits/valarray_after.h:409:5: note: candidate: 'template<class _Dom> std::_Expr<std::__detail::_BinClos<std::__modulus, std::_Expr, std::_ValArray, _Dom, typename _Dom::value_type>, typename std::__fun<std::__modulus, typename _Dom1::value_type>::result_type> std::operator%(const std::_Expr<_Dom1, typename _Dom1::value_type>&, const std::valarray<typename _Dom::value_type>&)'
409 | _DEFINE_EXPR_BINARY_OPERATOR(%, struct std::__modulus)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/11/bits/valarray_after.h:409:5: note: template argument deduction/substitution failed:
Alice.cpp:27:30: note: 'std::mt19937_64' {aka 'std::mersenne_twister_engine<long unsigned int, 64, 312, 156, 31, 13043109905998158313, 29, 6148914691236517205, 17, 8202884508482404352, 37, 18444473444759240704, 43, 6364136223846793005>'} is not derived from 'const std::_Expr<_Dom1, typename _Dom1::value_type>'
27 | return l + (rd%(r - l + 1) + r - l + 1)%(r - l + 1);
| ^
In file included from /usr/include/c++/11/valarray:603,
from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:95,
from Alice.cpp:4:
/usr/include/c++/11/bits/valarray_after.h:409:5: note: candidate: 'template<class _Dom> std::_Expr<std::__detail::_BinClos<std::__modulus, std::_ValArray, std::_Expr, typename _Dom::value_type, _Dom>, typename std::__fun<std::__modulus, typename _Dom1::value_type>::result_type> std::operator%(const std::valarray<typename _Dom::value_type>&, const std::_Expr<_Dom1, typename _Dom1::value_type>&)'
409 | _DEFINE_EXPR_BINARY_OPERATOR(%, struct std::__modulus)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/11/bits/valarray_after.h:409:5: note: template argument deduction/substitution failed:
Alice.cpp:27:30: note: mismatched types 'const std::_Expr<_Dom1, typename _Dom1::value_type>' and 'long long int'
27 | return l + (rd%(r - l + 1) + r - l + 1)%(r - l + 1);
| ^
In file included from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:95,
from Alice.cpp:4:
/usr/include/c++/11/valarray:1190:1: note: candidate: 'template<class _Tp> std::_Expr<std::__detail::_BinClos<std::__modulus, std::_ValArray, std::_ValArray, _Tp, _Tp>, typename std::__fun<std::__modulus, _Tp>::result_type> std::operator%(const std::valarray<_Tp>&, const std::valarray<_Tp>&)'
1190 | _DEFINE_BINARY_OPERATOR(%, __modulus)
| ^~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/11/valarray:1190:1: note: template argument deduction/substitution failed:
Alice.cpp:27:30: note: 'std::mt19937_64' {aka 'std::mersenne_twister_engine<long unsigned int, 64, 312, 156, 31, 13043109905998158313, 29, 6148914691236517205, 17, 8202884508482404352, 37, 18444473444759240704, 43, 6364136223846793005>'} is not derived from 'const std::valarray<_Tp>'
27 | return l + (rd%(r - l + 1) + r - l + 1)%(r - l + 1);
| ^
In file included from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:95,
from Alice.cpp:4:
/usr/include/c++/11/valarray:1190:1: note: candidate: 'template<class _Tp> std::_Expr<std::__detail::_BinClos<std::__modulus, std::_ValArray, std::_Constant, _Tp, _Tp>, typename std::__fun<std::__modulus, _Tp>::result_type> std::operator%(const std::valarray<_Tp>&, const typename std::valarray<_Tp>::value_type&)'
1190 | _DEFINE_BINARY_OPERATOR(%, __modulus)
| ^~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/11/valarray:1190:1: note: template argument deduction/substitution failed:
Alice.cpp:27:30: note: 'std::mt19937_64' {aka 'std::mersenne_twister_engine<long unsigned int, 64, 312, 156, 31, 13043109905998158313, 29, 6148914691236517205, 17, 8202884508482404352, 37, 18444473444759240704, 43, 6364136223846793005>'} is not derived from 'const std::valarray<_Tp>'
27 | return l + (rd%(r - l + 1) + r - l + 1)%(r - l + 1);
| ^
In file included from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:95,
from Alice.cpp:4:
/usr/include/c++/11/valarray:1190:1: note: candidate: 'template<class _Tp> std::_Expr<std::__detail::_BinClos<std::__modulus, std::_Constant, std::_ValArray, _Tp, _Tp>, typename std::__fun<std::__modulus, _Tp>::result_type> std::operator%(const typename std::valarray<_Tp>::value_type&, const std::valarray<_Tp>&)'
1190 | _DEFINE_BINARY_OPERATOR(%, __modulus)
| ^~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/11/valarray:1190:1: note: template argument deduction/substitution failed:
Alice.cpp:27:30: note: mismatched types 'const std::valarray<_Tp>' and 'long long int'
27 | return l + (rd%(r - l + 1) + r - l + 1)%(r - l + 1);
| ^