Open Mr-Python-in-China opened 9 months ago
Luogu_P_5653_gen.py
import cyaron as c N=10 K=3 while True: io=c.IO("1.in") n=c.randint(1,N) m=c.randint(1,n) k=c.randint(3,K) io.input_writeln(1) io.input_writeln(n,m,k) a=c.Vector.random(n,[(1,k)],2) io.input_writeln(a) c.Compare.program("./Luogu_P_9653.bitfile",input=io, std_program="./Luogu_P_9653_std.bitfile")
使用该代码对拍时发现 Vector.random 的参数 mode 未生效。 经测试,似乎是由于枚举 VectorRandomMode.repeatable 不能直接与 int 类型的 mode 比较导致。 望修复。
Vector.random
mode
VectorRandomMode.repeatable
int
对的,不生效,我目前都是自己改了库包代码。
可以使用这个语法来生成可重复值 Vector.random(n, [(1, 1000000)], vector.VectorRandomMode.repeatable)
Luogu_P_5653_gen.py
使用该代码对拍时发现
Vector.random
的参数mode
未生效。 经测试,似乎是由于枚举VectorRandomMode.repeatable
不能直接与int
类型的mode
比较导致。 望修复。