luogu-dev / cyaron

CYaRon: Yet Another Random Olympic-iNformatics test data generator
GNU Lesser General Public License v3.0
1.31k stars 164 forks source link

Vector模式为0时二维数组中时还是有重复数据 #93

Closed Leaderzhangyi closed 2 years ago

Leaderzhangyi commented 2 years ago
import numpy as np
from cyaron import *

x = np.random.randint(0, 9)
i, j = 0, 5
out = []
for _ in range(x):
    out.append((i, j))
    i, j = j + 1, j + 5
print(out)
output = Vector.random(x, out,0)
print(output)

output:
[(0, 5), (6, 10), (11, 15), (16, 20), (21, 25)]
[[4, 9, 15, 16, 25], [0, 9, 13, 19, 24], [3, 10, 12, 20, 22], [3, 9, 11, 19, 21], [4, 7, 13, 20, 25]] # 第一个数组还是重复