This repository has been archived on 2026-05-22. You can view files and clone it, but cannot push or open issues or pull requests.
Files
NAIPC-2018/genwords.py
2018-03-25 22:52:29 -04:00

20 lines
417 B
Python

import random
from itertools import *
from math import factorial
alph = 'pyfgcrlaoeuidhtnsqjkxbmwvz'
L = 200
K = 5
combos = [''.join(x) for x in combinations(alph, r=K)]
with open('test/prefix/mytest.in', 'w') as f:
f.write(f'{len(combos)} {K}\n')
for w in combos:
f.write(w)
f.write('\n')
# f.write(''.join(random.choice(combos) for _ in range(10)))
f.write(''.join(combos[:4]))