File tree Expand file tree Collapse file tree 3 files changed +3
-3
lines changed
Expand file tree Collapse file tree 3 files changed +3
-3
lines changed Original file line number Diff line number Diff line change 44#include " ../number_theory/modint.hpp"
55#include " ../util/complex.hpp"
66#include < algorithm>
7- #include < complex>
87#include < cassert>
98#include < ranges>
109#include < vector>
Original file line number Diff line number Diff line change 11#ifndef CP_ALGO_NUMBER_THEORY_TWO_SQUARES_HPP
22#define CP_ALGO_NUMBER_THEORY_TWO_SQUARES_HPP
33#include " euler.hpp"
4+ #include " ../util/complex.hpp"
45#include < cassert>
5- #include < complex>
66#include < utility>
77#include < vector>
88#include < map>
99namespace cp_algo ::math {
10- using gaussint = std:: complex <int64_t >;
10+ using gaussint = complex <int64_t >;
1111 gaussint two_squares_prime_any (int64_t p) {
1212 if (p == 2 ) {
1313 return gaussint (1 , 1 );
Original file line number Diff line number Diff line change 22#define CP_ALGO_UTIL_COMPLEX_HPP
33#include < cmath>
44namespace cp_algo {
5+ // Custom implementation, since std::complex is UB on non-floating types
56 template <typename T>
67 struct complex {
78 using value_type = T;
You can’t perform that action at this time.
0 commit comments