From e4e39736eca7c1be0021bf86ac85a3b6bc05c6cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=BE=E3=81=95=E3=81=81=E3=81=81?= Date: Sat, 10 Jul 2021 23:38:19 -0900 Subject: [PATCH] Update _scc.py MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit deepcopyは遅いです. --- atcoder/_scc.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/atcoder/_scc.py b/atcoder/_scc.py index 500194e..7c5ea65 100644 --- a/atcoder/_scc.py +++ b/atcoder/_scc.py @@ -1,4 +1,3 @@ -import copy import sys import typing @@ -15,7 +14,7 @@ def __init__( for i in range(1, n + 1): self.start[i] += self.start[i - 1] - counter = copy.deepcopy(self.start) + counter = self.start.copy() for e in edges: self.elist[counter[e[0]]] = e[1] counter[e[0]] += 1