diff options
Diffstat (limited to '')
| -rw-r--r-- | test/012_math_permsign/00_solved.in | 8 | ||||
| -rw-r--r-- | test/012_math_permsign/00_solved.out (renamed from test/010_math_permsign/02_22swap.out) | 0 | ||||
| -rw-r--r-- | test/012_math_permsign/01_3cycle.in (renamed from test/010_math_permsign/01_3cycle.in) | 0 | ||||
| -rw-r--r-- | test/012_math_permsign/01_3cycle.out (renamed from test/010_math_permsign/04_5ycle.out) | 0 | ||||
| -rw-r--r-- | test/012_math_permsign/02_22swap.in (renamed from test/010_math_permsign/02_22swap.in) | 0 | ||||
| -rw-r--r-- | test/012_math_permsign/02_22swap.out | 1 | ||||
| -rw-r--r-- | test/012_math_permsign/03_singleswap.in (renamed from test/010_math_permsign/03_singleswap.in) | 0 | ||||
| -rw-r--r-- | test/012_math_permsign/03_singleswap.out (renamed from test/010_math_permsign/05_6ycle.out) | 0 | ||||
| -rw-r--r-- | test/012_math_permsign/04_5ycle.in (renamed from test/010_math_permsign/04_5ycle.in) | 0 | ||||
| -rw-r--r-- | test/012_math_permsign/04_5ycle.out | 1 | ||||
| -rw-r--r-- | test/012_math_permsign/05_6ycle.in (renamed from test/010_math_permsign/05_6ycle.in) | 0 | ||||
| -rw-r--r-- | test/012_math_permsign/05_6ycle.out | 1 | ||||
| -rw-r--r-- | test/012_math_permsign/permsign_tests.c (renamed from test/010_math_permsign/permsgn_tests.c) | 7 |
13 files changed, 15 insertions, 3 deletions
diff --git a/test/012_math_permsign/00_solved.in b/test/012_math_permsign/00_solved.in new file mode 100644 index 0000000..54b5db0 --- /dev/null +++ b/test/012_math_permsign/00_solved.in | |||
| @@ -0,0 +1,8 @@ | |||
| 1 | 7 | ||
| 2 | 0 | ||
| 3 | 1 | ||
| 4 | 2 | ||
| 5 | 3 | ||
| 6 | 4 | ||
| 7 | 5 | ||
| 8 | 6 | ||
diff --git a/test/010_math_permsign/02_22swap.out b/test/012_math_permsign/00_solved.out index 573541a..573541a 100644 --- a/test/010_math_permsign/02_22swap.out +++ b/test/012_math_permsign/00_solved.out | |||
diff --git a/test/010_math_permsign/01_3cycle.in b/test/012_math_permsign/01_3cycle.in index bfabfd6..bfabfd6 100644 --- a/test/010_math_permsign/01_3cycle.in +++ b/test/012_math_permsign/01_3cycle.in | |||
diff --git a/test/010_math_permsign/04_5ycle.out b/test/012_math_permsign/01_3cycle.out index 573541a..573541a 100644 --- a/test/010_math_permsign/04_5ycle.out +++ b/test/012_math_permsign/01_3cycle.out | |||
diff --git a/test/010_math_permsign/02_22swap.in b/test/012_math_permsign/02_22swap.in index d0b0921..d0b0921 100644 --- a/test/010_math_permsign/02_22swap.in +++ b/test/012_math_permsign/02_22swap.in | |||
diff --git a/test/012_math_permsign/02_22swap.out b/test/012_math_permsign/02_22swap.out new file mode 100644 index 0000000..573541a --- /dev/null +++ b/test/012_math_permsign/02_22swap.out | |||
| @@ -0,0 +1 @@ | |||
| 0 | |||
diff --git a/test/010_math_permsign/03_singleswap.in b/test/012_math_permsign/03_singleswap.in index 42a584b..42a584b 100644 --- a/test/010_math_permsign/03_singleswap.in +++ b/test/012_math_permsign/03_singleswap.in | |||
diff --git a/test/010_math_permsign/05_6ycle.out b/test/012_math_permsign/03_singleswap.out index d00491f..d00491f 100644 --- a/test/010_math_permsign/05_6ycle.out +++ b/test/012_math_permsign/03_singleswap.out | |||
diff --git a/test/010_math_permsign/04_5ycle.in b/test/012_math_permsign/04_5ycle.in index 630f6fa..630f6fa 100644 --- a/test/010_math_permsign/04_5ycle.in +++ b/test/012_math_permsign/04_5ycle.in | |||
diff --git a/test/012_math_permsign/04_5ycle.out b/test/012_math_permsign/04_5ycle.out new file mode 100644 index 0000000..573541a --- /dev/null +++ b/test/012_math_permsign/04_5ycle.out | |||
| @@ -0,0 +1 @@ | |||
| 0 | |||
diff --git a/test/010_math_permsign/05_6ycle.in b/test/012_math_permsign/05_6ycle.in index a226bae..a226bae 100644 --- a/test/010_math_permsign/05_6ycle.in +++ b/test/012_math_permsign/05_6ycle.in | |||
diff --git a/test/012_math_permsign/05_6ycle.out b/test/012_math_permsign/05_6ycle.out new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/test/012_math_permsign/05_6ycle.out | |||
| @@ -0,0 +1 @@ | |||
| 1 | |||
diff --git a/test/010_math_permsign/permsgn_tests.c b/test/012_math_permsign/permsign_tests.c index 04975db..fa8ce9b 100644 --- a/test/010_math_permsign/permsgn_tests.c +++ b/test/012_math_permsign/permsign_tests.c | |||
| @@ -1,14 +1,15 @@ | |||
| 1 | #include "../test.h" | 1 | #include "../test.h" |
| 2 | 2 | ||
| 3 | int permsign(uint8_t *, int); | 3 | int permsign(uint8_t *, int64_t); |
| 4 | 4 | ||
| 5 | void run(void) { | 5 | void run(void) { |
| 6 | char str[STRLENMAX]; | 6 | char str[STRLENMAX]; |
| 7 | uint8_t a[100]; | 7 | uint8_t a[100]; |
| 8 | int n, i, p; | 8 | int p; |
| 9 | int64_t n, i; | ||
| 9 | 10 | ||
| 10 | fgets(str, STRLENMAX, stdin); | 11 | fgets(str, STRLENMAX, stdin); |
| 11 | n = atoi(str); | 12 | n = atoll(str); |
| 12 | 13 | ||
| 13 | for (i = 0; i < n; i++) { | 14 | for (i = 0; i < n; i++) { |
| 14 | fgets(str, STRLENMAX, stdin); | 15 | fgets(str, STRLENMAX, stdin); |
