Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

一个生成随机数据的脚本,和一些简单的数据

Posted by lddlinan at 2020-09-18 18:50:46 on Problem 1433
from random import shuffle

t = 10
n = 100
m = 250

s = []
for i in range(1, n+1):
    for j in range(i+1, n+1):
        s.append((i,j))

print t
for _ in range(t):
    print n,m
    shuffle(s)
    for a, b in s[:m]:
        print a,b,
    print



# 
10
10 25
4 6 8 10 7 9 4 8 5 8 4 5 1 10 3 5 1 2 1 3 5 10 5 9 3 10 2 6 3 7 1 9 2 4 2 9 6 10 7 8 3 9 2 10 2 3 6 8 3 8
10 25
4 6 2 4 3 5 1 9 4 8 2 7 6 10 1 10 7 10 6 9 3 8 5 6 1 8 5 9 1 2 2 6 2 3 2 10 4 9 6 7 2 5 1 3 2 8 4 10 5 10
10 25
5 8 3 10 2 5 1 2 3 5 7 10 2 7 1 9 4 8 4 10 2 4 2 9 5 9 7 8 7 9 4 9 4 5 1 8 6 10 5 7 2 3 9 10 1 4 1 10 3 4
10 25
5 9 5 6 1 9 1 7 1 2 1 3 3 6 6 8 3 4 1 10 1 5 8 9 5 10 6 10 2 9 2 3 4 10 4 9 7 8 6 9 2 8 2 4 8 10 4 5 5 7
10 25
8 9 1 7 7 9 2 5 2 7 3 10 6 7 9 10 3 4 2 10 5 9 3 9 1 9 1 2 3 8 6 9 1 6 2 8 6 8 4 5 3 5 5 8 8 10 1 10 1 5
10 25
3 9 5 9 4 10 7 9 2 10 4 8 2 8 2 3 2 9 2 4 5 10 4 9 3 5 3 4 2 7 9 10 5 7 1 9 3 7 8 10 7 10 1 5 3 10 5 6 4 6
10 25
4 9 2 9 6 9 4 10 2 6 5 6 5 8 4 6 7 9 3 6 1 6 1 4 2 7 7 10 1 9 6 10 6 8 7 8 4 8 2 3 3 7 1 8 9 10 3 5 1 10
10 25
8 10 5 7 1 10 5 9 2 4 7 9 3 4 1 5 2 9 4 6 1 8 3 9 6 7 3 7 4 9 2 10 2 5 3 5 6 8 1 4 3 6 3 10 4 10 1 2 1 7
10 25
2 9 1 4 3 6 6 9 7 8 2 4 2 5 5 7 2 7 4 6 6 8 5 9 1 5 6 10 4 8 3 10 3 5 9 10 3 7 3 9 2 8 4 5 7 10 4 9 2 10
10 25
3 4 6 8 2 4 2 8 2 6 5 10 1 6 1 3 4 6 3 10 7 8 1 8 4 8 6 9 1 7 4 10 1 9 1 10 2 10 2 9 7 10 8 10 6 10 9 10 2 3


#
6
6
6
7
5
7
7
4
7
7

Followed by:

Post your reply here:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator