Skip to content

Commit c2fc2c3

Browse files
author
Takanori MAEHARA
committed
Karatsuba Multiplication
1 parent 7514d4b commit c2fc2c3

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

math/karatsuba_multiplication.cc

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@
88
//
99
//
1010
// Complexity
11-
// O(n^log 3), faster than naive method for n >= 1000
11+
// O(n^log 3), always faster than naive method
1212
//
1313
// Verified
1414
// SPOJ 31: Fast Multiplication
15-
// (Remark: TLE for VFMUL)
15+
// SPOJ 235: Very Fast Multiplication
1616

1717
#include <iostream>
1818
#include <cstdio>
@@ -26,9 +26,6 @@ using namespace std;
2626

2727
#define REP(i,n) for(int i=0;i<n;++i)
2828

29-
// Karatsuba multiplication
30-
//
31-
// faster on n >= 1000
3229
typedef long long LL;
3330
void mul(LL a[], int an, LL b[], int bn, LL c[], int &cn) {
3431
if (an < bn) { swap(an, bn); swap(a, b); }

0 commit comments

Comments
 (0)