Skip to content

Commit c2eccc0

Browse files
committed
add blazingio as a submodule
1 parent bb3dea3 commit c2eccc0

File tree

4 files changed

+14
-6
lines changed

4 files changed

+14
-6
lines changed

.gitmodules

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "blazingio"]
2+
path = blazingio
3+
url = https://github.com/purplesyringa/blazingio.git

blazingio

Submodule blazingio added at f1ec303

cp-algo/number_theory/modint.hpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -91,14 +91,14 @@ namespace cp_algo::math {
9191
template<typename modint>
9292
concept modint_type = std::is_base_of_v<modint_base<modint, typename modint::Int>, modint>;
9393
template<modint_type modint>
94-
std::istream& operator >> (std::istream &in, modint &x) {
94+
decltype(std::cin)& operator >> (decltype(std::cin) &in, modint &x) {
9595
typename modint::UInt r;
9696
auto &res = in >> r;
9797
x.setr(r);
9898
return res;
9999
}
100100
template<modint_type modint>
101-
std::ostream& operator << (std::ostream &out, modint const& x) {
101+
decltype(std::cout)& operator << (decltype(std::cout) &out, modint const& x) {
102102
return out << x.getr();
103103
}
104104

verify/poly/convolution107.test.cpp

+8-4
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
// @brief Convolution mod $10^9+7$
22
#define PROBLEM "https://judge.yosupo.jp/problem/convolution_mod_1000000007"
33
#pragma GCC optimize("Ofast,unroll-loops")
4-
#include "cp-algo/math/fft.hpp"
4+
#define CP_ALGO_CHECKPOINT
55
#include <bits/stdc++.h>
6+
#include "blazingio/blazingio.min.hpp"
7+
#include "cp-algo/math/fft.hpp"
68

79
using namespace std;
810
using namespace cp_algo::math;
@@ -14,10 +16,12 @@ void solve() {
1416
int n, m;
1517
cin >> n >> m;
1618
vector<base, cp_algo::big_alloc<base>> a(n), b(m);
17-
copy_n(istream_iterator<base>(cin), n, begin(a));
18-
copy_n(istream_iterator<base>(cin), m, begin(b));
19+
for(auto &x: a) {cin >> x;}
20+
for(auto &x: b) {cin >> x;}
21+
cp_algo::checkpoint("read");
1922
fft::mul(a, b);
20-
ranges::copy(a, ostream_iterator<base>(cout, " "));
23+
for(auto x: a) {cout << x << " ";}
24+
cp_algo::checkpoint("write");
2125
}
2226

2327
signed main() {

0 commit comments

Comments
 (0)