Skip to content

Commit 2153a8e

Browse files
committed
update prod_mod_2
1 parent 21d1de5 commit 2153a8e

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
#define PROBLEM "https://judge.yosupo.jp/problem/matrix_product_mod_2"
43
#pragma GCC optimize("Ofast,unroll-loops")
4+
#define CP_ALGO_CHECKPOINT
55
#include "cp-algo/structures/bitpack.hpp"
6+
#include "cp-algo/util/checkpoint.hpp"
67
#include <bits/stdc++.h>
78

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

2728
void solve() {
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
signed main() {

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy