aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorSebastiano Tronto <sebastiano@tronto.net>2025-03-26 19:22:50 +0100
committerSebastiano Tronto <sebastiano@tronto.net>2025-03-26 19:22:50 +0100
commit83338a2f753ebbb7ba7b154cc60b2f427b6121b0 (patch)
tree149efb6a0b835fd6b3d89f7fd7808f8eed8e0288 /test
parent56048d13b73ec6e6a9c59d62e82f41e69a3994bd (diff)
downloadnissy-core-83338a2f753ebbb7ba7b154cc60b2f427b6121b0.tar.gz
nissy-core-83338a2f753ebbb7ba7b154cc60b2f427b6121b0.zip
Added inverse coordinate for CO
this is necessary for DR coordinate
Diffstat (limited to 'test')
-rw-r--r--test/079_invcoord_co/00_solved.in1
-rw-r--r--test/079_invcoord_co/00_solved.out1
-rw-r--r--test/079_invcoord_co/01_U.in1
-rw-r--r--test/079_invcoord_co/01_U.out1
-rw-r--r--test/079_invcoord_co/02_U2.in1
-rw-r--r--test/079_invcoord_co/02_U2.out1
-rw-r--r--test/079_invcoord_co/03_U3.in1
-rw-r--r--test/079_invcoord_co/03_U3.out1
-rw-r--r--test/079_invcoord_co/04_D.in1
-rw-r--r--test/079_invcoord_co/04_D.out1
-rw-r--r--test/079_invcoord_co/07_R.in1
-rw-r--r--test/079_invcoord_co/07_R.out1
-rw-r--r--test/079_invcoord_co/08_R2.in1
-rw-r--r--test/079_invcoord_co/08_R2.out1
-rw-r--r--test/079_invcoord_co/10_L.in1
-rw-r--r--test/079_invcoord_co/10_L.out1
-rw-r--r--test/079_invcoord_co/13_F.in1
-rw-r--r--test/079_invcoord_co/13_F.out1
-rw-r--r--test/079_invcoord_co/14_F2.in1
-rw-r--r--test/079_invcoord_co/14_F2.out1
-rw-r--r--test/079_invcoord_co/16_B.in1
-rw-r--r--test/079_invcoord_co/16_B.out1
-rw-r--r--test/079_invcoord_co/17_B2.in1
-rw-r--r--test/079_invcoord_co/17_B2.out1
-rw-r--r--test/079_invcoord_co/20_scrambled.in1
-rw-r--r--test/079_invcoord_co/20_scrambled.out1
-rw-r--r--test/079_invcoord_co/invcoord_co_tests.c28
27 files changed, 54 insertions, 0 deletions
diff --git a/test/079_invcoord_co/00_solved.in b/test/079_invcoord_co/00_solved.in
new file mode 100644
index 0000000..573541a
--- /dev/null
+++ b/test/079_invcoord_co/00_solved.in
@@ -0,0 +1 @@
0
diff --git a/test/079_invcoord_co/00_solved.out b/test/079_invcoord_co/00_solved.out
new file mode 100644
index 0000000..573541a
--- /dev/null
+++ b/test/079_invcoord_co/00_solved.out
@@ -0,0 +1 @@
0
diff --git a/test/079_invcoord_co/01_U.in b/test/079_invcoord_co/01_U.in
new file mode 100644
index 0000000..573541a
--- /dev/null
+++ b/test/079_invcoord_co/01_U.in
@@ -0,0 +1 @@
0
diff --git a/test/079_invcoord_co/01_U.out b/test/079_invcoord_co/01_U.out
new file mode 100644
index 0000000..573541a
--- /dev/null
+++ b/test/079_invcoord_co/01_U.out
@@ -0,0 +1 @@
0
diff --git a/test/079_invcoord_co/02_U2.in b/test/079_invcoord_co/02_U2.in
new file mode 100644
index 0000000..573541a
--- /dev/null
+++ b/test/079_invcoord_co/02_U2.in
@@ -0,0 +1 @@
0
diff --git a/test/079_invcoord_co/02_U2.out b/test/079_invcoord_co/02_U2.out
new file mode 100644
index 0000000..573541a
--- /dev/null
+++ b/test/079_invcoord_co/02_U2.out
@@ -0,0 +1 @@
0
diff --git a/test/079_invcoord_co/03_U3.in b/test/079_invcoord_co/03_U3.in
new file mode 100644
index 0000000..573541a
--- /dev/null
+++ b/test/079_invcoord_co/03_U3.in
@@ -0,0 +1 @@
0
diff --git a/test/079_invcoord_co/03_U3.out b/test/079_invcoord_co/03_U3.out
new file mode 100644
index 0000000..573541a
--- /dev/null
+++ b/test/079_invcoord_co/03_U3.out
@@ -0,0 +1 @@
0
diff --git a/test/079_invcoord_co/04_D.in b/test/079_invcoord_co/04_D.in
new file mode 100644
index 0000000..573541a
--- /dev/null
+++ b/test/079_invcoord_co/04_D.in
@@ -0,0 +1 @@
0
diff --git a/test/079_invcoord_co/04_D.out b/test/079_invcoord_co/04_D.out
new file mode 100644
index 0000000..573541a
--- /dev/null
+++ b/test/079_invcoord_co/04_D.out
@@ -0,0 +1 @@
0
diff --git a/test/079_invcoord_co/07_R.in b/test/079_invcoord_co/07_R.in
new file mode 100644
index 0000000..1f3d8a7
--- /dev/null
+++ b/test/079_invcoord_co/07_R.in
@@ -0,0 +1 @@
1028
diff --git a/test/079_invcoord_co/07_R.out b/test/079_invcoord_co/07_R.out
new file mode 100644
index 0000000..1f3d8a7
--- /dev/null
+++ b/test/079_invcoord_co/07_R.out
@@ -0,0 +1 @@
1028
diff --git a/test/079_invcoord_co/08_R2.in b/test/079_invcoord_co/08_R2.in
new file mode 100644
index 0000000..573541a
--- /dev/null
+++ b/test/079_invcoord_co/08_R2.in
@@ -0,0 +1 @@
0
diff --git a/test/079_invcoord_co/08_R2.out b/test/079_invcoord_co/08_R2.out
new file mode 100644
index 0000000..573541a
--- /dev/null
+++ b/test/079_invcoord_co/08_R2.out
@@ -0,0 +1 @@
0
diff --git a/test/079_invcoord_co/10_L.in b/test/079_invcoord_co/10_L.in
new file mode 100644
index 0000000..f96ac06
--- /dev/null
+++ b/test/079_invcoord_co/10_L.in
@@ -0,0 +1 @@
105
diff --git a/test/079_invcoord_co/10_L.out b/test/079_invcoord_co/10_L.out
new file mode 100644
index 0000000..f96ac06
--- /dev/null
+++ b/test/079_invcoord_co/10_L.out
@@ -0,0 +1 @@
105
diff --git a/test/079_invcoord_co/13_F.in b/test/079_invcoord_co/13_F.in
new file mode 100644
index 0000000..86868c5
--- /dev/null
+++ b/test/079_invcoord_co/13_F.in
@@ -0,0 +1 @@
1630
diff --git a/test/079_invcoord_co/13_F.out b/test/079_invcoord_co/13_F.out
new file mode 100644
index 0000000..86868c5
--- /dev/null
+++ b/test/079_invcoord_co/13_F.out
@@ -0,0 +1 @@
1630
diff --git a/test/079_invcoord_co/14_F2.in b/test/079_invcoord_co/14_F2.in
new file mode 100644
index 0000000..573541a
--- /dev/null
+++ b/test/079_invcoord_co/14_F2.in
@@ -0,0 +1 @@
0
diff --git a/test/079_invcoord_co/14_F2.out b/test/079_invcoord_co/14_F2.out
new file mode 100644
index 0000000..573541a
--- /dev/null
+++ b/test/079_invcoord_co/14_F2.out
@@ -0,0 +1 @@
0
diff --git a/test/079_invcoord_co/16_B.in b/test/079_invcoord_co/16_B.in
new file mode 100644
index 0000000..1c599d4
--- /dev/null
+++ b/test/079_invcoord_co/16_B.in
@@ -0,0 +1 @@
516
diff --git a/test/079_invcoord_co/16_B.out b/test/079_invcoord_co/16_B.out
new file mode 100644
index 0000000..1c599d4
--- /dev/null
+++ b/test/079_invcoord_co/16_B.out
@@ -0,0 +1 @@
516
diff --git a/test/079_invcoord_co/17_B2.in b/test/079_invcoord_co/17_B2.in
new file mode 100644
index 0000000..573541a
--- /dev/null
+++ b/test/079_invcoord_co/17_B2.in
@@ -0,0 +1 @@
0
diff --git a/test/079_invcoord_co/17_B2.out b/test/079_invcoord_co/17_B2.out
new file mode 100644
index 0000000..573541a
--- /dev/null
+++ b/test/079_invcoord_co/17_B2.out
@@ -0,0 +1 @@
0
diff --git a/test/079_invcoord_co/20_scrambled.in b/test/079_invcoord_co/20_scrambled.in
new file mode 100644
index 0000000..6943e4d
--- /dev/null
+++ b/test/079_invcoord_co/20_scrambled.in
@@ -0,0 +1 @@
957
diff --git a/test/079_invcoord_co/20_scrambled.out b/test/079_invcoord_co/20_scrambled.out
new file mode 100644
index 0000000..6943e4d
--- /dev/null
+++ b/test/079_invcoord_co/20_scrambled.out
@@ -0,0 +1 @@
957
diff --git a/test/079_invcoord_co/invcoord_co_tests.c b/test/079_invcoord_co/invcoord_co_tests.c
new file mode 100644
index 0000000..c3bf90e
--- /dev/null
+++ b/test/079_invcoord_co/invcoord_co_tests.c
@@ -0,0 +1,28 @@
1#include "../test.h"
2
3int64_t coord_co(cube_t);
4cube_t invcoord_co(int64_t);
5
6void run(void) {
7 char str[STRLENMAX];
8 cube_t cube;
9 int64_t coord;
10
11 fgets(str, STRLENMAX, stdin);
12 coord = atoll(str);
13
14 cube = invcoord_co(coord);
15
16 if (!isconsistent(cube)) {
17 printf("Not consistent\n");
18 return;
19 }
20 if (!issolvable(cube)) {
21 printf("Not solvable\n");
22 return;
23 }
24
25 coord = coord_co(cube);
26
27 printf("%" PRId64 "\n", coord);
28}

Generated with cgit - Back to sebastiano.tronto.net