diff --git a/all_test/test_cases/10/dict.dic b/all_test/test_cases/10/dict.dic new file mode 100644 index 0000000..5accfe3 --- /dev/null +++ b/all_test/test_cases/10/dict.dic @@ -0,0 +1,3 @@ +TOTAL_STATION = 10 +STRATEGY = SSTF +#end diff --git a/all_test/test_cases/10/input.txt b/all_test/test_cases/10/input.txt new file mode 100644 index 0000000..9107e4a --- /dev/null +++ b/all_test/test_cases/10/input.txt @@ -0,0 +1,11 @@ +clock +clockwise 8 +clock +clockwise 8 +clock +clock +clock +clock +clock +clock +end diff --git a/all_test/test_cases/10/output.txt b/all_test/test_cases/10/output.txt new file mode 100644 index 0000000..94cbfe9 --- /dev/null +++ b/all_test/test_cases/10/output.txt @@ -0,0 +1,64 @@ +TIME:0 +BUS: +position:0 +target:0000000000 +STATION: +clockwise:0000000000 +counterclockwise:0000000000 +TIME:1 +BUS: +position:0 +target:0000000000 +STATION: +clockwise:0000000000 +counterclockwise:0000000000 +TIME:2 +BUS: +position:19 +target:0000000000 +STATION: +clockwise:0000000100 +counterclockwise:0000000000 +TIME:3 +BUS: +position:18 +target:0000000000 +STATION: +clockwise:0000000100 +counterclockwise:0000000000 +TIME:4 +BUS: +position:17 +target:0000000000 +STATION: +clockwise:0000000100 +counterclockwise:0000000000 +TIME:5 +BUS: +position:16 +target:0000000000 +STATION: +clockwise:0000000100 +counterclockwise:0000000000 +TIME:6 +BUS: +position:15 +target:0000000000 +STATION: +clockwise:0000000100 +counterclockwise:0000000000 +TIME:7 +BUS: +position:14 +target:0000000000 +STATION: +clockwise:0000000100 +counterclockwise:0000000000 +TIME:8 +BUS: +position:14 +target:0000000000 +STATION: +clockwise:0000000000 +counterclockwise:0000000000 +end diff --git a/all_test/test_cases/11/dict.dic b/all_test/test_cases/11/dict.dic new file mode 100644 index 0000000..5accfe3 --- /dev/null +++ b/all_test/test_cases/11/dict.dic @@ -0,0 +1,3 @@ +TOTAL_STATION = 10 +STRATEGY = SSTF +#end diff --git a/all_test/test_cases/11/input.txt b/all_test/test_cases/11/input.txt new file mode 100644 index 0000000..bcf3841 --- /dev/null +++ b/all_test/test_cases/11/input.txt @@ -0,0 +1,14 @@ +clock +clockwise 8 +clock +clockwise 9 +clock +clock +clock +clock +clock +clock +clock +clock +clock +end diff --git a/all_test/test_cases/11/output.txt b/all_test/test_cases/11/output.txt new file mode 100644 index 0000000..082b7d1 --- /dev/null +++ b/all_test/test_cases/11/output.txt @@ -0,0 +1,85 @@ +TIME:0 +BUS: +position:0 +target:0000000000 +STATION: +clockwise:0000000000 +counterclockwise:0000000000 +TIME:1 +BUS: +position:0 +target:0000000000 +STATION: +clockwise:0000000000 +counterclockwise:0000000000 +TIME:2 +BUS: +position:19 +target:0000000000 +STATION: +clockwise:0000000100 +counterclockwise:0000000000 +TIME:3 +BUS: +position:18 +target:0000000000 +STATION: +clockwise:0000000110 +counterclockwise:0000000000 +TIME:4 +BUS: +position:17 +target:0000000000 +STATION: +clockwise:0000000110 +counterclockwise:0000000000 +TIME:5 +BUS: +position:16 +target:0000000000 +STATION: +clockwise:0000000110 +counterclockwise:0000000000 +TIME:6 +BUS: +position:15 +target:0000000000 +STATION: +clockwise:0000000110 +counterclockwise:0000000000 +TIME:7 +BUS: +position:14 +target:0000000000 +STATION: +clockwise:0000000110 +counterclockwise:0000000000 +TIME:8 +BUS: +position:14 +target:0000000000 +STATION: +clockwise:0000000010 +counterclockwise:0000000000 +TIME:9 +BUS: +position:15 +target:0000000000 +STATION: +clockwise:0000000010 +counterclockwise:0000000000 +TIME:10 +BUS: +position:16 +target:0000000000 +STATION: +clockwise:0000000010 +counterclockwise:0000000000 +TIME:11 +BUS: +position:16 +target:0000000000 +STATION: +clockwise:0000000000 +counterclockwise:0000000000 +end diff --git a/all_test/test_cases/12/dict.dic b/all_test/test_cases/12/dict.dic new file mode 100644 index 0000000..5accfe3 --- /dev/null +++ b/all_test/test_cases/12/dict.dic @@ -0,0 +1,3 @@ +TOTAL_STATION = 10 +STRATEGY = SSTF +#end diff --git a/all_test/test_cases/12/input.txt b/all_test/test_cases/12/input.txt new file mode 100644 index 0000000..e0e8165 --- /dev/null +++ b/all_test/test_cases/12/input.txt @@ -0,0 +1,14 @@ +clock +clockwise 4 +clock +clock +clock +target 3 +clock +clock +clock +clock +clock +clock +clock +end diff --git a/all_test/test_cases/12/output.txt b/all_test/test_cases/12/output.txt new file mode 100644 index 0000000..a9174f4 --- /dev/null +++ b/all_test/test_cases/12/output.txt @@ -0,0 +1,85 @@ +TIME:0 +BUS: +position:0 +target:0000000000 +STATION: +clockwise:0000000000 +counterclockwise:0000000000 +TIME:1 +BUS: +position:0 +target:0000000000 +STATION: +clockwise:0000000000 +counterclockwise:0000000000 +TIME:2 +BUS: +position:1 +target:0000000000 +STATION: +clockwise:0001000000 +counterclockwise:0000000000 +TIME:3 +BUS: +position:2 +target:0000000000 +STATION: +clockwise:0001000000 +counterclockwise:0000000000 +TIME:4 +BUS: +position:3 +target:0000000000 +STATION: +clockwise:0001000000 +counterclockwise:0000000000 +TIME:5 +BUS: +position:4 +target:0010000000 +STATION: +clockwise:0001000000 +counterclockwise:0000000000 +TIME:6 +BUS: +position:4 +target:0000000000 +STATION: +clockwise:0001000000 +counterclockwise:0000000000 +TIME:7 +BUS: +position:5 +target:0000000000 +STATION: +clockwise:0001000000 +counterclockwise:0000000000 +TIME:8 +BUS: +position:6 +target:0000000000 +STATION: +clockwise:0001000000 +counterclockwise:0000000000 +TIME:9 +BUS: +position:6 +target:0000000000 +STATION: +clockwise:0000000000 +counterclockwise:0000000000 +TIME:10 +BUS: +position:6 +target:0000000000 +STATION: +clockwise:0000000000 +counterclockwise:0000000000 +TIME:11 +BUS: +position:6 +target:0000000000 +STATION: +clockwise:0000000000 +counterclockwise:0000000000 +end diff --git a/all_test/test_cases/13/dict.dic b/all_test/test_cases/13/dict.dic new file mode 100644 index 0000000..5accfe3 --- /dev/null +++ b/all_test/test_cases/13/dict.dic @@ -0,0 +1,3 @@ +TOTAL_STATION = 10 +STRATEGY = SSTF +#end diff --git a/all_test/test_cases/13/input.txt b/all_test/test_cases/13/input.txt new file mode 100644 index 0000000..4096cad --- /dev/null +++ b/all_test/test_cases/13/input.txt @@ -0,0 +1,16 @@ +clock +clockwise 4 +clock +clockwise 5 +clock +counterclockwise 4 +clock +target 4 +clock +clock +clock +clock +clock +clock +clock +end diff --git a/all_test/test_cases/13/output.txt b/all_test/test_cases/13/output.txt new file mode 100644 index 0000000..fe10352 --- /dev/null +++ b/all_test/test_cases/13/output.txt @@ -0,0 +1,85 @@ +TIME:0 +BUS: +position:0 +target:0000000000 +STATION: +clockwise:0000000000 +counterclockwise:0000000000 +TIME:1 +BUS: +position:0 +target:0000000000 +STATION: +clockwise:0000000000 +counterclockwise:0000000000 +TIME:2 +BUS: +position:1 +target:0000000000 +STATION: +clockwise:0001000000 +counterclockwise:0000000000 +TIME:3 +BUS: +position:2 +target:0000000000 +STATION: +clockwise:0001100000 +counterclockwise:0000000000 +TIME:4 +BUS: +position:3 +target:0000000000 +STATION: +clockwise:0001100000 +counterclockwise:0001000000 +TIME:5 +BUS: +position:4 +target:0001000000 +STATION: +clockwise:0001100000 +counterclockwise:0001000000 +TIME:6 +BUS: +position:5 +target:0001000000 +STATION: +clockwise:0001100000 +counterclockwise:0001000000 +TIME:7 +BUS: +position:6 +target:0001000000 +STATION: +clockwise:0001100000 +counterclockwise:0001000000 +TIME:8 +BUS: +position:6 +target:0000000000 +STATION: +clockwise:0000100000 +counterclockwise:0000000000 +TIME:9 +BUS: +position:7 +target:0000000000 +STATION: +clockwise:0000100000 +counterclockwise:0000000000 +TIME:10 +BUS: +position:8 +target:0000000000 +STATION: +clockwise:0000100000 +counterclockwise:0000000000 +TIME:11 +BUS: +position:8 +target:0000000000 +STATION: +clockwise:0000000000 +counterclockwise:0000000000 +end diff --git a/all_test/test_cases/14/dict.dic b/all_test/test_cases/14/dict.dic new file mode 100644 index 0000000..5accfe3 --- /dev/null +++ b/all_test/test_cases/14/dict.dic @@ -0,0 +1,3 @@ +TOTAL_STATION = 10 +STRATEGY = SSTF +#end diff --git a/all_test/test_cases/14/input.txt b/all_test/test_cases/14/input.txt new file mode 100644 index 0000000..5c2326a --- /dev/null +++ b/all_test/test_cases/14/input.txt @@ -0,0 +1,12 @@ +clock +clockwise 2 +counterclockwise 10 +clock +clock +clock +clock +clock +clock +clock +clock +end diff --git a/all_test/test_cases/14/output.txt b/all_test/test_cases/14/output.txt new file mode 100644 index 0000000..720f50f --- /dev/null +++ b/all_test/test_cases/14/output.txt @@ -0,0 +1,71 @@ +TIME:0 +BUS: +position:0 +target:0000000000 +STATION: +clockwise:0000000000 +counterclockwise:0000000000 +TIME:1 +BUS: +position:0 +target:0000000000 +STATION: +clockwise:0000000000 +counterclockwise:0000000000 +TIME:2 +BUS: +position:1 +target:0000000000 +STATION: +clockwise:0100000000 +counterclockwise:0000000001 +TIME:3 +BUS: +position:2 +target:0000000000 +STATION: +clockwise:0100000000 +counterclockwise:0000000001 +TIME:4 +BUS: +position:2 +target:0000000000 +STATION: +clockwise:0000000000 +counterclockwise:0000000001 +TIME:5 +BUS: +position:1 +target:0000000000 +STATION: +clockwise:0000000000 +counterclockwise:0000000001 +TIME:6 +BUS: +position:0 +target:0000000000 +STATION: +clockwise:0000000000 +counterclockwise:0000000001 +TIME:7 +BUS: +position:19 +target:0000000000 +STATION: +clockwise:0000000000 +counterclockwise:0000000001 +TIME:8 +BUS: +position:18 +target:0000000000 +STATION: +clockwise:0000000000 +counterclockwise:0000000001 +TIME:9 +BUS: +position:18 +target:0000000000 +STATION: +clockwise:0000000000 +counterclockwise:0000000000 +end diff --git a/all_test/test_cases/15/dict.dic b/all_test/test_cases/15/dict.dic new file mode 100644 index 0000000..5accfe3 --- /dev/null +++ b/all_test/test_cases/15/dict.dic @@ -0,0 +1,3 @@ +TOTAL_STATION = 10 +STRATEGY = SSTF +#end diff --git a/all_test/test_cases/15/input.txt b/all_test/test_cases/15/input.txt new file mode 100644 index 0000000..650d08a --- /dev/null +++ b/all_test/test_cases/15/input.txt @@ -0,0 +1,48 @@ +clock +clockwise 6 +clock +clockwise 5 +clock +counterclockwise 9 +clock +target 3 +clock +clock +target 10 +clockwise 7 +clock +target 1 +clock +counterclockwise 2 +clock +target 4 +clock +target 8 +clock +clock +clock +clock +clock +clock +clock +clock +clock +clock +clock +clock +clock +clock +clock +clock +clock +clock +clock +clock +clock +clock +clock +clock +clock +clock +clock +end diff --git a/all_test/test_cases/15/output.txt b/all_test/test_cases/15/output.txt new file mode 100644 index 0000000..22589c1 --- /dev/null +++ b/all_test/test_cases/15/output.txt @@ -0,0 +1,267 @@ +TIME:0 +BUS: +position:0 +target:0000000000 +STATION: +clockwise:0000000000 +counterclockwise:0000000000 +TIME:1 +BUS: +position:0 +target:0000000000 +STATION: +clockwise:0000000000 +counterclockwise:0000000000 +TIME:2 +BUS: +position:1 +target:0000000000 +STATION: +clockwise:0000010000 +counterclockwise:0000000000 +TIME:3 +BUS: +position:2 +target:0000000000 +STATION: +clockwise:0000110000 +counterclockwise:0000000000 +TIME:4 +BUS: +position:3 +target:0000000000 +STATION: +clockwise:0000110000 +counterclockwise:0000000010 +TIME:5 +BUS: +position:4 +target:0010000000 +STATION: +clockwise:0000110000 +counterclockwise:0000000010 +TIME:6 +BUS: +position:4 +target:0000000000 +STATION: +clockwise:0000110000 +counterclockwise:0000000010 +TIME:7 +BUS: +position:5 +target:0000000001 +STATION: +clockwise:0000111000 +counterclockwise:0000000010 +TIME:8 +BUS: +position:6 +target:1000000001 +STATION: +clockwise:0000111000 +counterclockwise:0000000010 +TIME:9 +BUS: +position:7 +target:1000000001 +STATION: +clockwise:0000111000 +counterclockwise:0100000010 +TIME:10 +BUS: +position:8 +target:1001000001 +STATION: +clockwise:0000111000 +counterclockwise:0100000010 +TIME:11 +BUS: +position:8 +target:1001000101 +STATION: +clockwise:0000011000 +counterclockwise:0100000010 +TIME:12 +BUS: +position:9 +target:1001000101 +STATION: +clockwise:0000011000 +counterclockwise:0100000010 +TIME:13 +BUS: +position:10 +target:1001000101 +STATION: +clockwise:0000011000 +counterclockwise:0100000010 +TIME:14 +BUS: +position:10 +target:1001000101 +STATION: +clockwise:0000001000 +counterclockwise:0100000010 +TIME:15 +BUS: +position:11 +target:1001000101 +STATION: +clockwise:0000001000 +counterclockwise:0100000010 +TIME:16 +BUS: +position:12 +target:1001000101 +STATION: +clockwise:0000001000 +counterclockwise:0100000010 +TIME:17 +BUS: +position:12 +target:1001000101 +STATION: +clockwise:0000000000 +counterclockwise:0100000010 +TIME:18 +BUS: +position:13 +target:1001000101 +STATION: +clockwise:0000000000 +counterclockwise:0100000010 +TIME:19 +BUS: +position:14 +target:1001000101 +STATION: +clockwise:0000000000 +counterclockwise:0100000010 +TIME:20 +BUS: +position:14 +target:1001000001 +STATION: +clockwise:0000000000 +counterclockwise:0100000010 +TIME:21 +BUS: +position:15 +target:1001000001 +STATION: +clockwise:0000000000 +counterclockwise:0100000010 +TIME:22 +BUS: +position:16 +target:1001000001 +STATION: +clockwise:0000000000 +counterclockwise:0100000010 +TIME:23 +BUS: +position:16 +target:1001000001 +STATION: +clockwise:0000000000 +counterclockwise:0100000000 +TIME:24 +BUS: +position:17 +target:1001000001 +STATION: +clockwise:0000000000 +counterclockwise:0100000000 +TIME:25 +BUS: +position:18 +target:1001000001 +STATION: +clockwise:0000000000 +counterclockwise:0100000000 +TIME:26 +BUS: +position:18 +target:1001000000 +STATION: +clockwise:0000000000 +counterclockwise:0100000000 +TIME:27 +BUS: +position:19 +target:1001000000 +STATION: +clockwise:0000000000 +counterclockwise:0100000000 +TIME:28 +BUS: +position:0 +target:1001000000 +STATION: +clockwise:0000000000 +counterclockwise:0100000000 +TIME:29 +BUS: +position:0 +target:0001000000 +STATION: +clockwise:0000000000 +counterclockwise:0100000000 +TIME:30 +BUS: +position:1 +target:0001000000 +STATION: +clockwise:0000000000 +counterclockwise:0100000000 +TIME:31 +BUS: +position:2 +target:0001000000 +STATION: +clockwise:0000000000 +counterclockwise:0100000000 +TIME:32 +BUS: +position:2 +target:0001000000 +STATION: +clockwise:0000000000 +counterclockwise:0000000000 +TIME:33 +BUS: +position:3 +target:0001000000 +STATION: +clockwise:0000000000 +counterclockwise:0000000000 +TIME:34 +BUS: +position:4 +target:0001000000 +STATION: +clockwise:0000000000 +counterclockwise:0000000000 +TIME:35 +BUS: +position:5 +target:0001000000 +STATION: +clockwise:0000000000 +counterclockwise:0000000000 +TIME:36 +BUS: +position:6 +target:0001000000 +STATION: +clockwise:0000000000 +counterclockwise:0000000000 +TIME:37 +BUS: +position:6 +target:0000000000 +STATION: +clockwise:0000000000 +counterclockwise:0000000000 +end diff --git a/all_test/test_cases/16/dict.dic b/all_test/test_cases/16/dict.dic new file mode 100644 index 0000000..5accfe3 --- /dev/null +++ b/all_test/test_cases/16/dict.dic @@ -0,0 +1,3 @@ +TOTAL_STATION = 10 +STRATEGY = SSTF +#end diff --git a/all_test/test_cases/16/input.txt b/all_test/test_cases/16/input.txt new file mode 100644 index 0000000..a1fce3e --- /dev/null +++ b/all_test/test_cases/16/input.txt @@ -0,0 +1,24 @@ +clock +clockwise 8 +clock +counterclockwise 9 +clock +clock +clock +clock +clock +clock +clock +clock +clock +clockwise 6 +clock +counterclockwise 7 +clock +clock +clock +clock +clock +clock +clock +end diff --git a/all_test/test_cases/16/output.txt b/all_test/test_cases/16/output.txt new file mode 100644 index 0000000..dc9d595 --- /dev/null +++ b/all_test/test_cases/16/output.txt @@ -0,0 +1,141 @@ +TIME:0 +BUS: +position:0 +target:0000000000 +STATION: +clockwise:0000000000 +counterclockwise:0000000000 +TIME:1 +BUS: +position:0 +target:0000000000 +STATION: +clockwise:0000000000 +counterclockwise:0000000000 +TIME:2 +BUS: +position:19 +target:0000000000 +STATION: +clockwise:0000000100 +counterclockwise:0000000000 +TIME:3 +BUS: +position:18 +target:0000000000 +STATION: +clockwise:0000000100 +counterclockwise:0000000010 +TIME:4 +BUS: +position:17 +target:0000000000 +STATION: +clockwise:0000000100 +counterclockwise:0000000010 +TIME:5 +BUS: +position:16 +target:0000000000 +STATION: +clockwise:0000000100 +counterclockwise:0000000010 +TIME:6 +BUS: +position:16 +target:0000000000 +STATION: +clockwise:0000000100 +counterclockwise:0000000000 +TIME:7 +BUS: +position:15 +target:0000000000 +STATION: +clockwise:0000000100 +counterclockwise:0000000000 +TIME:8 +BUS: +position:14 +target:0000000000 +STATION: +clockwise:0000000100 +counterclockwise:0000000000 +TIME:9 +BUS: +position:14 +target:0000000000 +STATION: +clockwise:0000000000 +counterclockwise:0000000000 +TIME:10 +BUS: +position:14 +target:0000000000 +STATION: +clockwise:0000000000 +counterclockwise:0000000000 +TIME:11 +BUS: +position:14 +target:0000000000 +STATION: +clockwise:0000000000 +counterclockwise:0000000000 +TIME:12 +BUS: +position:13 +target:0000000000 +STATION: +clockwise:0000010000 +counterclockwise:0000000000 +TIME:13 +BUS: +position:12 +target:0000000000 +STATION: +clockwise:0000010000 +counterclockwise:0000001000 +TIME:14 +BUS: +position:12 +target:0000000000 +STATION: +clockwise:0000010000 +counterclockwise:0000000000 +TIME:15 +BUS: +position:11 +target:0000000000 +STATION: +clockwise:0000010000 +counterclockwise:0000000000 +TIME:16 +BUS: +position:10 +target:0000000000 +STATION: +clockwise:0000010000 +counterclockwise:0000000000 +TIME:17 +BUS: +position:10 +target:0000000000 +STATION: +clockwise:0000000000 +counterclockwise:0000000000 +TIME:18 +BUS: +position:10 +target:0000000000 +STATION: +clockwise:0000000000 +counterclockwise:0000000000 +TIME:19 +BUS: +position:10 +target:0000000000 +STATION: +clockwise:0000000000 +counterclockwise:0000000000 +end diff --git a/all_test/test_cases/17/dict.dic b/all_test/test_cases/17/dict.dic new file mode 100644 index 0000000..5accfe3 --- /dev/null +++ b/all_test/test_cases/17/dict.dic @@ -0,0 +1,3 @@ +TOTAL_STATION = 10 +STRATEGY = SSTF +#end diff --git a/all_test/test_cases/17/input.txt b/all_test/test_cases/17/input.txt new file mode 100644 index 0000000..9f9f7a7 --- /dev/null +++ b/all_test/test_cases/17/input.txt @@ -0,0 +1,15 @@ +clock +counterclockwise 6 +clock +clock +clock +clock +clock +clock +clock +clock +clock +clock +clock +clock +end diff --git a/all_test/test_cases/17/output.txt b/all_test/test_cases/17/output.txt new file mode 100644 index 0000000..3e2643f --- /dev/null +++ b/all_test/test_cases/17/output.txt @@ -0,0 +1,99 @@ +TIME:0 +BUS: +position:0 +target:0000000000 +STATION: +clockwise:0000000000 +counterclockwise:0000000000 +TIME:1 +BUS: +position:0 +target:0000000000 +STATION: +clockwise:0000000000 +counterclockwise:0000000000 +TIME:2 +BUS: +position:1 +target:0000000000 +STATION: +clockwise:0000000000 +counterclockwise:0000010000 +TIME:3 +BUS: +position:2 +target:0000000000 +STATION: +clockwise:0000000000 +counterclockwise:0000010000 +TIME:4 +BUS: +position:3 +target:0000000000 +STATION: +clockwise:0000000000 +counterclockwise:0000010000 +TIME:5 +BUS: +position:4 +target:0000000000 +STATION: +clockwise:0000000000 +counterclockwise:0000010000 +TIME:6 +BUS: +position:5 +target:0000000000 +STATION: +clockwise:0000000000 +counterclockwise:0000010000 +TIME:7 +BUS: +position:6 +target:0000000000 +STATION: +clockwise:0000000000 +counterclockwise:0000010000 +TIME:8 +BUS: +position:7 +target:0000000000 +STATION: +clockwise:0000000000 +counterclockwise:0000010000 +TIME:9 +BUS: +position:8 +target:0000000000 +STATION: +clockwise:0000000000 +counterclockwise:0000010000 +TIME:10 +BUS: +position:9 +target:0000000000 +STATION: +clockwise:0000000000 +counterclockwise:0000010000 +TIME:11 +BUS: +position:10 +target:0000000000 +STATION: +clockwise:0000000000 +counterclockwise:0000010000 +TIME:12 +BUS: +position:10 +target:0000000000 +STATION: +clockwise:0000000000 +counterclockwise:0000000000 +TIME:13 +BUS: +position:10 +target:0000000000 +STATION: +clockwise:0000000000 +counterclockwise:0000000000 +end diff --git a/all_test/test_cases/8/dict.dic b/all_test/test_cases/8/dict.dic new file mode 100644 index 0000000..5accfe3 --- /dev/null +++ b/all_test/test_cases/8/dict.dic @@ -0,0 +1,3 @@ +TOTAL_STATION = 10 +STRATEGY = SSTF +#end diff --git a/all_test/test_cases/8/input.txt b/all_test/test_cases/8/input.txt new file mode 100644 index 0000000..c745f1b --- /dev/null +++ b/all_test/test_cases/8/input.txt @@ -0,0 +1,16 @@ +clock +clockwise 3 +clockwise 10 +clock +clock +clock +clock +clock +clockwise 2 +clock +clock +clock +clock +clock +clock +end diff --git a/all_test/test_cases/8/output.txt b/all_test/test_cases/8/output.txt new file mode 100644 index 0000000..f77e2b6 --- /dev/null +++ b/all_test/test_cases/8/output.txt @@ -0,0 +1,92 @@ +TIME:0 +BUS: +position:0 +target:0000000000 +STATION: +clockwise:0000000000 +counterclockwise:0000000000 +TIME:1 +BUS: +position:0 +target:0000000000 +STATION: +clockwise:0000000000 +counterclockwise:0000000000 +TIME:2 +BUS: +position:19 +target:0000000000 +STATION: +clockwise:0010000001 +counterclockwise:0000000000 +TIME:3 +BUS: +position:18 +target:0000000000 +STATION: +clockwise:0010000001 +counterclockwise:0000000000 +TIME:4 +BUS: +position:18 +target:0000000000 +STATION: +clockwise:0010000000 +counterclockwise:0000000000 +TIME:5 +BUS: +position:19 +target:0000000000 +STATION: +clockwise:0010000000 +counterclockwise:0000000000 +TIME:6 +BUS: +position:0 +target:0000000000 +STATION: +clockwise:0010000000 +counterclockwise:0000000000 +TIME:7 +BUS: +position:1 +target:0000000000 +STATION: +clockwise:0110000000 +counterclockwise:0000000000 +TIME:8 +BUS: +position:2 +target:0000000000 +STATION: +clockwise:0110000000 +counterclockwise:0000000000 +TIME:9 +BUS: +position:2 +target:0000000000 +STATION: +clockwise:0010000000 +counterclockwise:0000000000 +TIME:10 +BUS: +position:3 +target:0000000000 +STATION: +clockwise:0010000000 +counterclockwise:0000000000 +TIME:11 +BUS: +position:4 +target:0000000000 +STATION: +clockwise:0010000000 +counterclockwise:0000000000 +TIME:12 +BUS: +position:4 +target:0000000000 +STATION: +clockwise:0000000000 +counterclockwise:0000000000 +end diff --git a/all_test/test_cases/9/dict.dic b/all_test/test_cases/9/dict.dic new file mode 100644 index 0000000..5accfe3 --- /dev/null +++ b/all_test/test_cases/9/dict.dic @@ -0,0 +1,3 @@ +TOTAL_STATION = 10 +STRATEGY = SSTF +#end diff --git a/all_test/test_cases/9/input.txt b/all_test/test_cases/9/input.txt new file mode 100644 index 0000000..e0a2cb4 --- /dev/null +++ b/all_test/test_cases/9/input.txt @@ -0,0 +1,12 @@ +clock +clockwise 3 +clock +clock +clockwise 2 +clock +clock +clock +clock +clock +clock +end diff --git a/all_test/test_cases/9/output.txt b/all_test/test_cases/9/output.txt new file mode 100644 index 0000000..b00df4f --- /dev/null +++ b/all_test/test_cases/9/output.txt @@ -0,0 +1,71 @@ +TIME:0 +BUS: +position:0 +target:0000000000 +STATION: +clockwise:0000000000 +counterclockwise:0000000000 +TIME:1 +BUS: +position:0 +target:0000000000 +STATION: +clockwise:0000000000 +counterclockwise:0000000000 +TIME:2 +BUS: +position:1 +target:0000000000 +STATION: +clockwise:0010000000 +counterclockwise:0000000000 +TIME:3 +BUS: +position:2 +target:0000000000 +STATION: +clockwise:0010000000 +counterclockwise:0000000000 +TIME:4 +BUS: +position:3 +target:0000000000 +STATION: +clockwise:0110000000 +counterclockwise:0000000000 +TIME:5 +BUS: +position:4 +target:0000000000 +STATION: +clockwise:0110000000 +counterclockwise:0000000000 +TIME:6 +BUS: +position:4 +target:0000000000 +STATION: +clockwise:0100000000 +counterclockwise:0000000000 +TIME:7 +BUS: +position:3 +target:0000000000 +STATION: +clockwise:0100000000 +counterclockwise:0000000000 +TIME:8 +BUS: +position:2 +target:0000000000 +STATION: +clockwise:0100000000 +counterclockwise:0000000000 +TIME:9 +BUS: +position:2 +target:0000000000 +STATION: +clockwise:0000000000 +counterclockwise:0000000000 +end diff --git a/convert.py b/convert.py new file mode 100644 index 0000000..f1e1a97 --- /dev/null +++ b/convert.py @@ -0,0 +1,39 @@ +from email.encoders import encode_noop +import os + +path = "SSTF/" +dict_path = path + "dict.dic" + +in_path = path + "{}.in" +out_path = path + "{}.out" + +dict_file = open(dict_path, "r", encoding="utf8") +dict_str = dict_file.read() +dict_file.close(); + +for i in range(1, 11): + dir_path = "{}/".format(i + 7) + + input_path = dir_path + "input.txt" + output_path = dir_path + "output.txt" + dict_path = dir_path + "dict.dic" + + os.mkdir("{}".format(i + 7)) + + in_file = open(in_path.format(i), "r", encoding="utf8") + out_file = open(out_path.format(i), "r", encoding="utf8") + input_file = open(input_path, "w", encoding="utf8") + output_file = open(output_path, "w", encoding="utf8") + dict_file = open(dict_path, "w", encoding="utf8") + + input_file.write(in_file.read()) + output_file.write(out_file.read()) + dict_file.write(dict_str) + + in_file.close() + out_file.close() + input_file.close() + output_file.close() + dict_file.close() + +