STL
so_so_y
start to record bugs <- so hard so brave
展开
-
POJ 2503 Babelfish(STL、二分、字典树、哈希)
DescriptionYou have just moved from Waterloo to a big city. The people here speak an incomprehensible dialect of a foreign language. Fortunately, you have a dictionary to help you understand them.Input原创 2017-08-09 20:58:41 · 1271 阅读 · 0 评论 -
Bubble Cup X - Finals [Online Mirror] G. Bathroom terminal(STL)
DescriptionSmith wakes up at the side of a dirty, disused bathroom, his ankle chained to pipes. Next to him is tape-player with a hand-written message “Play Me”. He finds a tape in his own back pocket.原创 2017-09-04 21:10:52 · 354 阅读 · 0 评论 -
HDU 6047 Maximum Sequence(多校2)
Problem DescriptionSteph is extremely obsessed with “sequence problems” that are usually seen on magazines: Given the sequence 11, 23, 30, 35, what is the next number? Steph always finds them too easy原创 2017-07-28 16:20:29 · 226 阅读 · 0 评论 -
51nod 1094 和为k的连续区间(map优化)
Description一整数数列a1, a2, … , an(有正有负),以及另一个整数k,求一个区间[i, j],(1 <= i <= j <= n),使得a[i] + … + a[j] = k。 Input 第1行:2个数N,K。N为数列的长度。K为需要求的和。(2 <= N <= 10000,-10^9 <= K <= 10^9) 第2 - N + 1行:A[i](-10^9 <= A[原创 2017-11-15 21:18:55 · 242 阅读 · 0 评论 -
Codeforces Hello 2018 B.Christmas Spruce
DescriptionConsider a rooted tree. A rooted tree has one special vertex called the root. All edges are directed from the root. Vertex u is called a child of vertex v and vertex v is called a parent原创 2018-01-11 22:04:31 · 235 阅读 · 0 评论 -
CodeForces - 845D Driving Test(模拟,栈)
DescriptionPolycarp has just attempted to pass the driving test. He ran over the straight road with the signs of four types.speed limit: this sign comes with a positive integer number — maximal sp...原创 2018-02-16 13:44:21 · 346 阅读 · 0 评论 -
历届试题 九宫重排 (bfs+康托展开(哈希))
问题描述 如下面第一个图的九宫格中,放着 1~8 的数字卡片,还有一个格子空着。与空格子相邻的格子中的卡片可以移动到空格中。经过若干次移动,可以形成第二个图所示的局面。 我们把第一个图的局面记为:12345678. 把第二个图的局面记为:123.46758 显然是按从上到下,从左到右的顺序记录数字,空格记为句点。 本题目的任务是已知九宫的初态和终态,求最少经过多少步的...原创 2018-03-30 11:38:48 · 249 阅读 · 0 评论