総当たり戦の日程作成
Posted feedbacks - Groovy
1 2 3 4 5 6 7 8 9 10 11 12 | def n = 6
def pairs = []
(1..n).each{ x ->
(1..n).each{ y ->
pairs << [x, y].sort()
}
}
// 出力
pairs.findAll{ it[0] != it[1] }.unique().each{
println it
}
|


ryugate
#5661()
Rating2/2=1.00
see: カークマンの組分け
[ reply ]