From fcf110d2318577a2d555a3f41e43ea01cdc0cd89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=BA=90=E6=96=87=E9=9B=A8?= <41315874+fumiama@users.noreply.github.com> Date: Sat, 30 Jul 2022 12:16:27 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=B5=81=E7=A8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.go | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/main.go b/main.go index c9ea816..35b57df 100644 --- a/main.go +++ b/main.go @@ -190,15 +190,17 @@ func main() { fmt.Println("sameset:", sameset) panic("index " + strconv.Itoa(j) + ", file " + chklst[j].name + " has been marked as set " + strconv.FormatUint(uint64(x), 10) + " but cannot be found in sameset") } - } else if isfirst { // 自立新组 - sameset = append(sameset, []uint{uint(i)}) - duplis[uint(i)] = uint(i) - isfirst = false - if isdebu { - fmt.Println("new set:", i) + } else { + if isfirst { // 自立新组 + sameset = append(sameset, []uint{uint(i)}) + duplis[uint(i)] = uint(i) + isfirst = false + if isdebu { + fmt.Println("new set:", i) + } } + duplis[uint(j)] = uint(i) } - duplis[uint(j)] = uint(i) if isdebu { fmt.Print("\n") }