25 lines
581 B
Python
25 lines
581 B
Python
import random
|
|
import os
|
|
# M = random.randint(10000, 100000)
|
|
# K = random.randint(10000, 65536)
|
|
# H = random.randint(10000, 100000)
|
|
M = 10
|
|
K = 5
|
|
H = 1
|
|
# arr = list(range(2147483647, 2147483647 - M, -1))
|
|
arr = list(range(0, M))
|
|
random.shuffle(arr)
|
|
# print(arr)
|
|
with open('fuck.txt', 'w') as f:
|
|
f.write(str(M)+' '+str(K)+' '+str(H)+'\n')
|
|
for i in arr:
|
|
f.write(str(i)+' ')
|
|
f.write('\n')
|
|
|
|
print("main")
|
|
os.system("./main.out < ./fuck.txt")
|
|
print("\ncorrect")
|
|
os.system("./correct.out < ./fuck.txt")
|
|
print("\nbrute_force")
|
|
os.system("./brute_force.out < ./fuck.txt")
|