Skip to content

Commit 27331c7

Browse files
committed
TDPC-G: Add a script to generate random input
1 parent eb0d9db commit 27331c7

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

tdpc-g/mkrandinput.lua

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
math.randomseed(os.time())
2+
3+
local a = string.byte "a"
4+
local t = {}
5+
for i = 1, 10^6 do
6+
t[i] = string.char(a + math.floor(math.random() * 26))
7+
end
8+
local f = assert(io.open("testinput.txt", "w"))
9+
f:write(table.concat(t), "\n")
10+
f:write("1000000000000000000\n")
11+
f:close()
12+

0 commit comments

Comments
 (0)