Skip to content

Commit

Permalink
[codejam - 2016-qualification] Add Common Lisp solution for D small.
Browse files Browse the repository at this point in the history
  • Loading branch information
abeaumont committed May 12, 2020
1 parent 0940598 commit ec88c3e
Show file tree
Hide file tree
Showing 6 changed files with 220 additions and 0 deletions.
5 changes: 5 additions & 0 deletions codejam/2016-qualification/d-1.ans
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Case #1: 1 2
Case #2: 1
Case #3: 1 2
Case #4: 1 2
Case #5: 1 2 3
6 changes: 6 additions & 0 deletions codejam/2016-qualification/d-1.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
5
2 3 2
1 1 1
2 1 2
2 1 2
3 2 3
100 changes: 100 additions & 0 deletions codejam/2016-qualification/d-2.ans
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
Case #1: 1 2
Case #2: 1
Case #3: 1 2
Case #4: 1 2 3
Case #5: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59
Case #6: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
Case #7: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
Case #8: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
Case #9: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72
Case #10: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64
Case #11: 1 2 3
Case #12: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
Case #13: 1 2 3 4
Case #14: 1 2
Case #15: 1 2 3 4 5 6 7 8 9 10 11 12 13 14
Case #16: 1 2 3 4 5 6
Case #17: 1
Case #18: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
Case #19: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75
Case #20: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
Case #21: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100
Case #22: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53
Case #23: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
Case #24: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
Case #25: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
Case #26: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
Case #27: 1 2 3 4 5 6 7 8 9 10
Case #28: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
Case #29: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100
Case #30: 1 2 3 4
Case #31: 1 2 3 4 5 6
Case #32: 1 2 3 4 5 6 7 8 9 10 11 12 13
Case #33: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65
Case #34: 1
Case #35: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
Case #36: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
Case #37: 1
Case #38: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100
Case #39: 1 2 3
Case #40: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100
Case #41: 1
Case #42: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60
Case #43: 1 2
Case #44: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
Case #45: 1 2 3
Case #46: 1 2 3 4 5
Case #47: 1 2 3 4 5 6 7 8 9 10
Case #48: 1 2 3 4 5
Case #49: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100
Case #50: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
Case #51: 1 2 3 4 5 6 7 8 9 10 11
Case #52: 1
Case #53: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100
Case #54: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
Case #55: 1 2 3 4
Case #56: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
Case #57: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61
Case #58: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92
Case #59: 1 2 3 4
Case #60: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93
Case #61: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
Case #62: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62
Case #63: 1 2
Case #64: 1 2 3 4 5 6 7
Case #65: 1 2 3 4 5 6 7 8 9 10
Case #66: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60
Case #67: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
Case #68: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
Case #69: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55
Case #70: 1 2
Case #71: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58
Case #72: 1 2 3
Case #73: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
Case #74: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
Case #75: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
Case #76: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
Case #77: 1
Case #78: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89
Case #79: 1 2 3 4 5 6 7 8 9
Case #80: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53
Case #81: 1 2 3 4 5 6 7 8 9 10 11 12
Case #82: 1
Case #83: 1 2 3 4 5 6 7 8 9 10 11
Case #84: 1 2 3 4
Case #85: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
Case #86: 1 2 3 4 5 6 7 8 9
Case #87: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80
Case #88: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69
Case #89: 1 2 3
Case #90: 1 2
Case #91: 1 2
Case #92: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95
Case #93: 1
Case #94: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
Case #95: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
Case #96: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
Case #97: 1
Case #98: 1 2 3 4 5 6 7 8 9
Case #99: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
Case #100: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59
101 changes: 101 additions & 0 deletions codejam/2016-qualification/d-2.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
100
2 3 2
1 1 1
2 1 2
3 2 3
59 7 59
37 2 37
51 6 51
47 2 47
72 6 72
64 9 64
3 4 3
15 13 15
4 29 4
2 39 2
14 7 14
6 22 6
1 100 1
24 3 24
75 8 75
49 3 49
100 1 100
53 10 53
18 9 18
30 1 30
45 7 45
20 13 20
10 5 10
28 12 28
100 3 100
4 1 4
6 3 6
13 3 13
65 9 65
1 2 1
34 1 34
24 1 24
1 5 1
100 9 100
3 32 3
100 5 100
1 43 1
60 5 60
2 16 2
63 8 63
3 1 3
5 11 5
10 18 10
5 2 5
100 4 100
43 4 43
11 11 11
1 71 1
100 2 100
36 9 36
4 3 4
25 2 25
61 5 61
92 4 92
4 4 4
93 4 93
21 12 21
62 2 62
2 59 2
7 21 7
10 10 10
60 1 60
40 6 40
48 9 48
55 9 55
2 4 2
58 8 58
3 3 3
15 9 15
33 1 33
40 10 40
38 3 38
1 3 1
89 7 89
9 7 9
53 5 53
12 2 12
1 4 1
11 17 11
4 2 4
30 12 30
9 18 9
80 8 80
69 3 69
3 37 3
2 2 2
2 6 2
95 9 95
1 35 1
16 4 16
16 13 16
28 1 28
1 90 1
9 16 9
39 7 39
59 5 59
6 changes: 6 additions & 0 deletions codejam/2016-qualification/d.lisp
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/sbcl --script
;; https://codingcompetitions.withgoogle.com/codejam/round/0000000000201bee/0000000000201bf1
(defun process (k c s) (loop for i from 1 to k collect i))

(loop for i from 1 to (read)
do (format t "Case #~a: ~{~a~^ ~}~%" i (process (read) (read) (read))))
2 changes: 2 additions & 0 deletions codejam/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ There are solutions for the following [Google Code Jam](https://codejam.withgoog
([problem site](https://codingcompetitions.withgoogle.com/codejam/round/00000000002017f7/0000000000201878))
1. [2017 Qualification Round - A. Oversized Pancake Flipper](2017-qualification/a.py)
([problem site](https://codingcompetitions.withgoogle.com/codejam/round/00000000002017f7/0000000000201847))
1. [2016 Qualification Round - D. Fractiles (small)](2016-qualification/d.lisp)
([problem site](https://codingcompetitions.withgoogle.com/codejam/round/0000000000201bee/0000000000201bf1))
1. [2016 Qualification Round - C. Coin Jam](2016-qualification/c.rkt)
([problem site](https://codingcompetitions.withgoogle.com/codejam/round/0000000000201bee/0000000000201b6d))
1. [2016 Qualification Round - B. Revenge of the Pancakes](2016-qualification/b.ml)
Expand Down

0 comments on commit ec88c3e

Please sign in to comment.