题意:给你一个原串和n个子串,问你这n个子串任意组合起来能不能使原串出现,串的长度为2。 Examples Input ya4ahoytoha Input Output YES Output Input hp2http Input Output NO Output Input ah1ha Input ...
分类:
其他好文 时间:
2017-10-07 14:44:31
阅读次数:
144
A. Between the Offices time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output As you may know, ...
分类:
数据库 时间:
2017-10-07 12:18:23
阅读次数:
306
Description Description Description Input Input Input Output Output Output Sample Input 题解: 水题,但还是打表过的…… 这个题目,我们显然可以对关键点进行加边。我就是因为加边加太多了才MLE的,当然对于1,2这 ...
分类:
其他好文 时间:
2017-10-05 19:35:06
阅读次数:
170
Bumb Description Input Output Sample Input 4 1 5 1 4 Sample Output 5 HINT Solution 首先,我们对于一个已知的k,可以O(n)得到Ans,这样就有60%了。 那么怎么做90%呢?老老实实写O(nlogn)是不可能的!模拟 ...
分类:
其他好文 时间:
2017-10-03 22:19:22
阅读次数:
169
Input Output Input示例 Output示例 #include<cstdio> #include<cstring> #include<algorithm> using namespace std; char ch[100100]; char T[200200]; int P[20020 ...
分类:
其他好文 时间:
2017-10-03 20:36:00
阅读次数:
247
语法子集很小,易用。 模块:module…endmodule 端口:input,output,inout(双向特殊) inout比较难用,有一张真值表,需要大家观察后书写,基本原则就是输入时一定是高阻态(z),与问号冒号运算符搭配使用。 信号:wire,reg,tri(测试用)… reg与wire常 ...
分类:
其他好文 时间:
2017-10-03 15:55:28
阅读次数:
273
地址:http://www.lydsy.com/JudgeOnline/problem.php?id=3091 题目: 3091: 城市旅行 Description Input Output Sample Input 4 5 1 3 2 5 1 2 1 3 2 4 4 2 4 1 2 4 2 3 4 ...
分类:
其他好文 时间:
2017-10-01 15:48:03
阅读次数:
195
长度为N的正整数序列S,有Q次询问,每次询问一段区间内所有数的lcm(即最小公倍数)。由于答案可能很大,输出答案Mod 10^9 + 7。 例如:2 3 4 5,询问[1,3]区间的最小公倍数为2 3 4的最小公倍数 = 12。 Input Output Input示例 Output示例 ...
分类:
其他好文 时间:
2017-09-29 21:20:34
阅读次数:
269
题目大意:有不超过14个点组成的完全图,给出邻接矩阵,问是否存在长度为W的欧拉回路? 数据范围:n<=14, w<=1e15; standard input/output 7 s, 256 MB 分析:直接暴力是14!的复杂度,显然不能通过; 考虑折半搜索,我们取0号点为起点,然后把所有的点分成两半 ...
分类:
其他好文 时间:
2017-09-29 21:08:21
阅读次数:
226
Description Description Description Input Input Input Output Output Output Sample Input Sample Input Sample Input Sample Output 题解: 这个题目本来是很难的,但因为数据很水 ...
分类:
其他好文 时间:
2017-09-29 13:23:20
阅读次数:
149