Skip to content

Commit cdc74e7

Browse files
committed
Fixed some bugs.
1 parent 8a3a4a1 commit cdc74e7

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

src/alfred/data_structure/cartesian.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#ifndef AFDS_CARTESIAN
22
#define AFDS_CARTESIAN
33

4-
#include <pair>
4+
#include <utility>
55
#include <vector>
66

77
// Returns pair of (ls, rs).

src/alfred/math/comb.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ class Comb {
3333
return _invfac[m];
3434
}
3535
inline mint inv(int m) {
36+
if (m < 0) return -inv(-m);
3637
if (m > n) init(m);
3738
return _inv[m];
3839
}

0 commit comments

Comments
 (0)