aboutsummaryrefslogtreecommitdiff
path: root/test/011_math_indextoperm/indextoperm_tests.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/011_math_indextoperm/indextoperm_tests.c')
-rw-r--r--test/011_math_indextoperm/indextoperm_tests.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/test/011_math_indextoperm/indextoperm_tests.c b/test/011_math_indextoperm/indextoperm_tests.c
new file mode 100644
index 0000000..cb1306d
--- /dev/null
+++ b/test/011_math_indextoperm/indextoperm_tests.c
@@ -0,0 +1,19 @@
1#include "../test.h"
2
3void indextoperm(int64_t, int64_t, uint8_t *);
4
5void run(void) {
6 char str[STRLENMAX];
7 uint8_t a[100];
8 int64_t n, p, i;
9
10 fgets(str, STRLENMAX, stdin);
11 n = atoll(str);
12 fgets(str, STRLENMAX, stdin);
13 p = atoll(str);
14
15 indextoperm(p, n, a);
16
17 for (i = 0; i < n; i++)
18 printf("%" PRIu8 "\n", a[i]);
19}

Generated with cgit - Back to sebastiano.tronto.net