Skip to content

Commit

Permalink
chore(rng): add rng assignment
Browse files Browse the repository at this point in the history
  • Loading branch information
tolstenko committed Aug 28, 2023
1 parent 23202ab commit 392b6f6
Show file tree
Hide file tree
Showing 24 changed files with 2,255 additions and 2 deletions.
3 changes: 2 additions & 1 deletion artificialintelligence/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,5 @@ function(add_custom_test TEST_NAME TEST_EXECUTABLE TEST_INPUT_LIST TEST_EXPECTED
endfunction()

add_subdirectory(assignments/maze)
add_subdirectory(assignments/life)
add_subdirectory(assignments/life)
add_subdirectory(assignments/rng)
7 changes: 7 additions & 0 deletions artificialintelligence/assignments/rng/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
add_executable(ai-rng rng.cpp)

file(GLOB TEST_INPUT_FILES ${CMAKE_CURRENT_SOURCE_DIR}/tests/*.in)
file(GLOB TEST_OUTPUT_FILES ${CMAKE_CURRENT_SOURCE_DIR}/tests/*.out)

add_custom_test(ai-maze-test ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/ai-rng "${TEST_INPUT_FILES}" "${TEST_OUTPUT_FILES}")

2 changes: 1 addition & 1 deletion artificialintelligence/assignments/rng/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,5 +77,5 @@ value = 69
So this output would be:

```text
1
69
```
4 changes: 4 additions & 0 deletions artificialintelligence/assignments/rng/rng.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// add your imports here
int main(){
// code here
}
1 change: 1 addition & 0 deletions artificialintelligence/assignments/rng/tests/test-a.in
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1 1 0 99
1 change: 1 addition & 0 deletions artificialintelligence/assignments/rng/tests/test-a.out
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
69
1 change: 1 addition & 0 deletions artificialintelligence/assignments/rng/tests/test-b.in
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2 10 20 89
10 changes: 10 additions & 0 deletions artificialintelligence/assignments/rng/tests/test-b.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
78
37
66
25
54
83
42
71
30
59
1 change: 1 addition & 0 deletions artificialintelligence/assignments/rng/tests/test-c.in
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3 5 10 20
5 changes: 5 additions & 0 deletions artificialintelligence/assignments/rng/tests/test-c.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
10
10
10
10
10
1 change: 1 addition & 0 deletions artificialintelligence/assignments/rng/tests/test-d.in
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
4 20 0 999
20 changes: 20 additions & 0 deletions artificialintelligence/assignments/rng/tests/test-d.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
476
845
214
583
952
321
690
59
428
797
166
535
937
240
675
978
413
716
151
454
1 change: 1 addition & 0 deletions artificialintelligence/assignments/rng/tests/test-e.in
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
5 25 100 999
25 changes: 25 additions & 0 deletions artificialintelligence/assignments/rng/tests/test-e.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
145
514
883
352
721
190
559
928
397
766
235
637
940
475
778
313
616
151
454
889
292
727
130
565
868
1 change: 1 addition & 0 deletions artificialintelligence/assignments/rng/tests/test-f.in
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
6 30 0 200
30 changes: 30 additions & 0 deletions artificialintelligence/assignments/rng/tests/test-f.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
144
168
192
15
39
63
87
111
135
159
15
174
63
21
111
69
159
117
6
165
54
12
102
60
150
108
30
111
147
27
1 change: 1 addition & 0 deletions artificialintelligence/assignments/rng/tests/test-g.in
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
7 40 9 10
40 changes: 40 additions & 0 deletions artificialintelligence/assignments/rng/tests/test-g.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
10
9
10
9
10
9
10
9
10
10
9
10
9
10
9
10
9
10
9
10
9
10
9
10
9
9
10
9
10
9
10
9
10
9
10
9
10
9
10
9
1 change: 1 addition & 0 deletions artificialintelligence/assignments/rng/tests/test-h.in
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
8 50 1 1
50 changes: 50 additions & 0 deletions artificialintelligence/assignments/rng/tests/test-h.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1 change: 1 addition & 0 deletions artificialintelligence/assignments/rng/tests/test-i.in
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1234567 50 123 321
50 changes: 50 additions & 0 deletions artificialintelligence/assignments/rng/tests/test-i.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
136
130
133
211
214
227
230
308
311
198
139
279
220
295
236
177
317
174
314
255
196
271
212
153
293
271
133
277
139
169
230
175
236
247
308
253
314
145
206
151
212
251
179
257
185
149
276
155
282
227
1 change: 1 addition & 0 deletions artificialintelligence/assignments/rng/tests/test-j.in
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
15 2000 100 99999
Loading

0 comments on commit 392b6f6

Please sign in to comment.