about summary refs log tree commit diff
path: root/12/QG-2017/virus_randinp.py
diff options
context:
space:
mode:
authorRaphael McSinyx <vn.mcsinyx@gmail.com>2017-06-27 12:10:09 +0700
committerRaphael McSinyx <vn.mcsinyx@gmail.com>2017-06-27 19:44:10 +0700
commit91b5248c8b951d82f3c9a2deb6ac928cce553497 (patch)
treedc4bcc60347ff6dbc4afde19c340724edaffa822 /12/QG-2017/virus_randinp.py
parentf38658aa390402fd3ef8b6f00f3235eb41009297 (diff)
downloadcp-91b5248c8b951d82f3c9a2deb6ac928cce553497.tar.gz
Add hsg/12/QG-2017/virus.c
Diffstat (limited to '12/QG-2017/virus_randinp.py')
-rwxr-xr-x12/QG-2017/virus_randinp.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/12/QG-2017/virus_randinp.py b/12/QG-2017/virus_randinp.py
new file mode 100755
index 0000000..566e452
--- /dev/null
+++ b/12/QG-2017/virus_randinp.py
@@ -0,0 +1,9 @@
+#!/usr/bin/env python3
+import random
+import string
+
+with open('VIRUS.INP', 'w') as f:
+    f.write('10\n')
+    for _ in range(3000):
+        f.write(random.choice(string.ascii_lowercase))
+    f.write('\n0\n1\n2\n3\n5\n6\n7\n8\n9\n10\n')