We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8a3a4a1 commit cdc74e7Copy full SHA for cdc74e7
2 files changed
src/alfred/data_structure/cartesian.hpp
@@ -1,7 +1,7 @@
1
#ifndef AFDS_CARTESIAN
2
#define AFDS_CARTESIAN
3
4
-#include <pair>
+#include <utility>
5
#include <vector>
6
7
// Returns pair of (ls, rs).
src/alfred/math/comb.hpp
@@ -33,6 +33,7 @@ class Comb {
33
return _invfac[m];
34
}
35
inline mint inv(int m) {
36
+ if (m < 0) return -inv(-m);
37
if (m > n) init(m);
38
return _inv[m];
39
0 commit comments