Problems # Name A Infinite Sequence standard input/output 1 s, 256 MB x3509 B Restoring Painting standard input/output 1 s, 256 MB x2519 C Money Transfers standard input/output 1 s, 256 MB x724 D Tree Construction standard input/outp…
题面戳我 Solution 我们按照每个字母出现的位置进行\(hash\),比如我们记录\(a\)的位置:我们就可以把位置表示为\(0101000111\)这种形式,然后进行字符串\(hash\) 每次查询时,我们就把两个子串的每个字母的\(hash\)值,取出来,判断能否一一对应即可 为啥我的常数那么大,2700ms Code //It is coded by ning_mew on 7.23 #include<bits/stdc++.h> #define LL long long usin…
题目描述 新款手机 iTone6 近期上市,George 很想买一只.不幸地,George 没有足够的钱,所以 George 打算当一名程序猿去打工.现在George遇到了一个问题. 给出一组有 n 个整数的数列p_1,p_2,-,p_n ,你需要挑出 k 组长度为 m 的数,要求这些数互不重叠 即 [l_{1},r_{1}],[l_{2},r_{2}],-,[l_{k},r_{k}] (1<=l_{1}<=r_{1}<l_{2}<=r_{2}<-<l_{k}<=…