File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
verify/structures/bitpack Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change 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
89using namespace std ;
@@ -25,6 +26,7 @@ void process_precalc() {
2526}
2627
2728void 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
5360signed main () {
You can’t perform that action at this time.
0 commit comments