aboutsummaryrefslogtreecommitdiff
path: root/old/2021-11-10-beforeremovingchecker/utils.h
diff options
context:
space:
mode:
Diffstat (limited to 'old/2021-11-10-beforeremovingchecker/utils.h')
-rw-r--r--old/2021-11-10-beforeremovingchecker/utils.h41
1 files changed, 0 insertions, 41 deletions
diff --git a/old/2021-11-10-beforeremovingchecker/utils.h b/old/2021-11-10-beforeremovingchecker/utils.h
deleted file mode 100644
index 80c33ae..0000000
--- a/old/2021-11-10-beforeremovingchecker/utils.h
+++ /dev/null
@@ -1,41 +0,0 @@
1#ifndef UTILS_H
2#define UTILS_H
3
4#include <stdbool.h>
5#include <stdlib.h>
6#include <string.h>
7
8#define POW2TO6 64ULL
9#define POW2TO11 2048ULL
10#define POW2TO12 4096ULL
11#define POW3TO7 2187ULL
12#define POW3TO8 6561ULL
13#define FACTORIAL4 24ULL
14#define FACTORIAL6 720ULL
15#define FACTORIAL7 5040ULL
16#define FACTORIAL8 40320ULL
17#define FACTORIAL12 479001600ULL
18#define BINOM12ON4 495ULL
19#define BINOM8ON4 70ULL
20#define MIN(a,b) (((a) < (b)) ? (a) : (b))
21#define MAX(a,b) (((a) > (b)) ? (a) : (b))
22
23void apply_permutation(int *perm, int *set, int n);
24int binomial(int n, int k);
25int digit_array_to_int(int *a, int n, int b);
26int factorial(int n);
27void index_to_perm(int p, int n, int *r);
28void index_to_subset(int s, int n, int k, int *r);
29void int_to_digit_array(int a, int b, int n, int *r);
30void int_to_sum_zero_array(int x, int b, int n, int *a);
31int invert_digits(int a, int b, int n);
32bool is_perm(int *a, int n);
33bool is_subset(int *a, int n, int k);
34int perm_sign(int *a, int n);
35int perm_to_index(int *a, int n);
36int powint(int a, int b);
37int subset_to_index(int *a, int n, int k);
38void sum_arrays_mod(int *src, int *dst, int n, int m);
39void swap(int *a, int *b);
40
41#endif

Generated with cgit - Back to sebastiano.tronto.net