33#pragma GCC optimize("Ofast,unroll-loops")
44#define CP_ALGO_CHECKPOINT
55#pragma GCC target("avx2")
6+ #include < bits/stdc++.h>
67#include " cp-algo/math/cvector.hpp"
78#include " cp-algo/random/rng.hpp"
8- #include < bits/stdc++.h>
99
1010using namespace std ;
1111using namespace cp_algo ::math;
@@ -27,7 +27,7 @@ auto is_integer(auto a) {
2727 return cp_algo::abs (a - cp_algo::round (a)) < eps;
2828}
2929
30- string matches (string const & A, string const & B, char wild = ' *' ) {
30+ cp_algo::big_string matches (cp_algo::big_string const & A, cp_algo::big_string const & B, char wild = ' *' ) {
3131 static ftype project[2 ][128 ];
3232 static bool init = false ;
3333 if (!init) {
@@ -61,7 +61,7 @@ string matches(string const& A, string const& B, char wild = '*') {
6161 ranges::for_each (B | views::reverse | views::enumerate, assign (1 ));
6262 cp_algo::checkpoint (" cvector fill" );
6363 semicorr (P[0 ], P[1 ]);
64- string ans (2 * size (P[0 ]), ' 0' );
64+ cp_algo::big_string ans (2 * size (P[0 ]), ' 0' );
6565 auto start = (ssize (B) - 1 ) / fft::flen * fft::flen;
6666 for (auto j = start; j < size (ans); j += fft::flen) {
6767 decltype (is_integer (real (P[0 ].at (j)))) check;
@@ -79,7 +79,7 @@ string matches(string const& A, string const& B, char wild = '*') {
7979}
8080
8181void solve () {
82- string a, b;
82+ cp_algo::big_string a, b;
8383 cin >> a >> b;
8484 cp_algo::checkpoint (" input" );
8585 cout << matches (a, b) << " \n " ;
0 commit comments