标签:class substring 最大 span pre repr bin tin tco
暴力就可以过,因为S最大1000,2的10次方就1024,后面的其实都不行.
class Solution(object): def queryString(self, S, N): if N>1024:return False return all(bin(i)[2:] in S for i in xrange(N,0, -1))
leetcode 1016. Binary String With Substrings Representing 1 To N
标签:class substring 最大 span pre repr bin tin tco
原文地址:https://www.cnblogs.com/zywscq/p/10699291.html