Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit2153a8e

Browse files
committed
update prod_mod_2
1 parent21d1de5 commit2153a8e

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

‎verify/structures/bitpack/prod_mod_2.test.cpp

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
21
// @brief Matrix Product (Mod 2)
32
#definePROBLEM"https://judge.yosupo.jp/problem/matrix_product_mod_2"
43
#pragma GCC optimize("Ofast,unroll-loops")
4+
#defineCP_ALGO_CHECKPOINT
55
#include"cp-algo/structures/bitpack.hpp"
6+
#include"cp-algo/util/checkpoint.hpp"
67
#include<bits/stdc++.h>
78

89
usingnamespacestd;
@@ -25,6 +26,7 @@ void process_precalc() {
2526
}
2627

2728
voidsolve() {
29+
cp_algo::checkpoint("init");
2830
int n, m, k;
2931
cin >> n >> m >> k;
3032
string row;
@@ -36,18 +38,23 @@ void solve() {
3638
cin >> row;
3739
b[i] = row;
3840
}
41+
cp_algo::checkpoint("read");
3942
process_precalc();
43+
cp_algo::checkpoint("precalc");
4044
for(int j =0; j < m; j +=64) {
4145
for(int z =0; z <64 / K; z++) {
4246
for(int i =0; i < n; i++) {
4347
c[i] ^= precalc[j / K + z][uint8_t(a[i].word(j /64) >> K * z)];
4448
}
4549
}
4650
}
51+
cp_algo::checkpoint("mul");
4752
for(int i =0; i < n; i++) {
4853
row = c[i].to_string().substr(0, k);
4954
cout << row <<"\n";
5055
}
56+
cp_algo::checkpoint("write");
57+
cp_algo::checkpoint<1>();
5158
}
5259

5360
signedmain() {

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp