defgenerate(): f = open('./code/0.in', 'w') """此处写生成测试数据函数,注释内容为示例 T = randint(1, 1000) f.writelines('%d\n' % T) lists = [] for i in range(T): while True: x = randint(1, 1e4) y = randint(1, 1e4) if [x, y] not in lists: lists.append([x, y]) f.writelines('%d %d\n' % (x, y)) break else: continue """ f.close()