@cache + dfs的递归和递推在复杂度上是等效的吧? from math import sqrt, log, gcd, inf # from math import isqrt #pypy 无 from operator import ixor, and_ from random import randint from string import ascii_lowercase from typing import List from heapq import * from collections import * from bisect import * from iterto...