Skip to content

Commit d2d31aa

Browse files
committed
Use auto for power in bpow
1 parent e6548b8 commit d2d31aa

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

cp-algo/math/common.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ namespace cp_algo::math {
1010
#endif
1111
const int magic = 64; // threshold for sizes to run the naive algo
1212

13-
auto bpow(auto const& x, int64_t n, auto const& one, auto op) {
13+
auto bpow(auto const& x, auto n, auto const& one, auto op) {
1414
if(n == 0) {
1515
return one;
1616
} else {
@@ -22,11 +22,11 @@ namespace cp_algo::math {
2222
return t;
2323
}
2424
}
25-
auto bpow(auto x, int64_t n, auto ans) {
25+
auto bpow(auto x, auto n, auto ans) {
2626
return bpow(x, n, ans, std::multiplies{});
2727
}
2828
template<typename T>
29-
T bpow(T const& x, int64_t n) {
29+
T bpow(T const& x, auto n) {
3030
return bpow(x, n, T(1));
3131
}
3232
}

0 commit comments

Comments
 (0)