- 博客(29)
- 资源 (1)
- 收藏
- 关注
原创 2048--c++游戏2018-8-23-18-24
#include <iostream>#include <bits/stdc++.h>#include <time.h>#include <conio.h>#include <windows.h>#include <process.h>using namespace std;int mp[20][20],Siz...
2018-08-23 18:25:32 195
原创 Snooker
G Snooker ProblemRonnie owns a very old TV with no sound, and a screen so unclear that letters cannot be read. So when Ronnie watches a Snooker match on TV, he cannot see the current score, nor the ...
2018-08-29 20:06:17 255
原创 Restructuring Company CodeForces - 566D
Even the most successful company can go through a crisis period when you have to make a hard decision — to restructure, discard and merge departments, fire employees and do other unpleasant stuff. Let...
2018-08-27 21:22:07 196 1
原创 I Hate It HDU - 1754
很多学校流行一种比较的习惯。老师们很喜欢询问,从某某到某某当中,分数最高的是多少。 这让很多学生很反感。 不管你喜不喜欢,现在需要你做的是,就是按照老师的要求,写一个程序,模拟老师的询问。当然,老师有时候需要更新某位同学的成绩。Input本题目包含多组测试,请处理到文件结束。 在每个测试的第一行,有两个正整数 N 和 M ( 0<N<=200000,0<M<5...
2018-08-27 20:57:09 116
原创 岛屿的数量 51Nod - 1276
有N个岛连在一起形成了一个大的岛屿,如果海平面上升超过某些岛的高度时,则这个岛会被淹没。原本的大岛屿则会分为多个小岛屿,如果海平面一直上升,则所有岛都会被淹没在水下。给出N个岛的高度。然后有Q个查询,每个查询给出一个海平面的高度H,问当海平面高度达到H时,海上共有多少个岛屿。例如:岛屿的高度为:{2, 1, 3, 2, 3}, 查询为:{0, 1, 3, 2}。当海面高度为0时,所有的...
2018-08-25 09:44:18 103
原创 4个数和为0 51Nod - 1267
给出N个整数,你来判断一下是否能够选出4个数,他们的和为0,可以则输出"Yes",否则输出"No"。Input第1行,1个数N,N为数组的长度(4 <= N <= 1000) 第2 - N + 1行:Aii(-10^9 <= Aii <= 10^9)Output如果可以选出4个数,使得他们的和为0,则输出"Yes",否则输出"No"。Sample In
2018-08-24 20:55:49 157
原创 Phalanx HDU - 2859
Today is army day, but the servicemen are busy with the phalanx for the celebration of the 60th anniversary of the PRC. A phalanx is a matrix of size n*n, each element is a character (a~z or A~Z), st...
2018-08-24 09:30:17 135
转载 HDU--1078--FatMouse and Cheese--记忆化搜索
转载:https://blog.csdn.net/jingdianitnan/article/details/41546005在这里致歉:此文章没有经过博主同意私自转载,若博主发现,可在下方评论,与我私聊解决HDU--1078--FatMouse and Cheese--记忆化搜索2014年11月27日 15:31:31 阅读数:596更多个人分类: 深搜DP FatMou...
2018-08-22 21:01:32 140
原创 Treats for the Cows &&区间DP
FJ has purchased N (1 <= N <= 2000) yummy treats for the cows who get money for giving vast amounts of milk. FJ sells one treat per day and wants to maximize the money he receives over a given p...
2018-08-22 09:03:42 115
原创 Help Jimmy
"Help Jimmy" 是在下图所示的场景上完成的游戏。 场景中包括多个长度和高度各不相同的平台。地面是最低的平台,高度为零,长度无限。 Jimmy老鼠在时刻0从高于所有平台的某处开始下落,它的下落速度始终为1米/秒。当Jimmy落到某个平台上时,游戏者选择让它向左还是向右跑,它跑动的速度也是1米/秒。当Jimmy跑到平台的边缘时,开始继续下落。Jimmy每次下落的高度不能超过MAX...
2018-08-21 11:56:16 180
原创 Common Subsequence
A subsequence of a given sequence is the given sequence with some elements (possible none) left out. Given a sequence X = < x1, x2, ..., xm > another sequence Z = < z1, z2, ..., zk > is a ...
2018-08-20 20:35:15 123
原创 FatMouse's Speed
FatMouse believes that the fatter a mouse is, the faster it runs. To disprove this, you want to take the data on a collection of mice and put as large a subset of this data as possible into a sequence...
2018-08-20 10:05:03 330
原创 Tickets
Jesus, what a great movie! Thousands of people are rushing to the cinema. However, this is really a tuff time for Joe who sells the film tickets. He is wandering when could he go back home as early as...
2018-08-20 09:14:38 197
原创 Find them, Catch them
警方决定捣毁两大犯罪团伙:龙帮和蛇帮,显然一个帮派至少有一人。该城有N个罪犯,编号从1至N(N<=100000。将有M(M<=100000)次操作。D a b 表示a、b是不同帮派A a b 询问a、b关系Input多组数据。第一行是数据总数 T (1 <= T <= 20)每组数据第一行是N、M,接下来M行是操作Output对于每一个A操作,回答"In...
2018-08-17 20:48:46 225
原创 Ignatius and the Princess IV
"OK, you are not too bad, em... But you can never pass the next test." feng5166 says. "I will tell you an odd number N, and then N integers. There will be a special integer among them, you have to te...
2018-08-17 10:37:45 116
原创 Max Sum Plus Plus
Now I think you have got an AC in Ignatius.L's "Max Sum" problem. To be a brave ACMer, we always challenge ourselves to more difficult problems. Now you are faced with a more difficult problem. Given...
2018-08-17 10:13:52 343
原创 堆模板
#include <stdio.h>#include <stdlib.h>int heap[500],n;void shiftdown(int note){ while(note*2<=n)//如果不存在子节点 { int mi=heap[note];//让最小值初始化为该节点 if(mi>heap[not...
2018-08-16 15:49:04 319 4
原创 Extended Traffic
Dhaka city is getting crowded and noisy day by day. Certain roads always remain blocked in congestion. In order to convince people avoid shortest routes, and hence the crowded roads, to reach destinat...
2018-08-15 21:13:00 356
原创 Tram
Tram network in Zagreb consists of a number of intersections and rails connecting some of them. In every intersection there is a switch pointing to the one of the rails going out of the intersection. ...
2018-08-15 10:29:46 455
原创 昂贵的聘礼
年轻的探险家来到了一个印第安部落里。在那里他和酋长的女儿相爱了,于是便向酋长去求亲。酋长要他用10000个金币作为聘礼才答应把女儿嫁给他。探险家拿不出这么多金币,便请求酋长降低要求。酋长说:"嗯,如果你能够替我弄到大祭司的皮袄,我可以只要8000金币。如果你能够弄来他的水晶球,那么只要5000金币就行了。"探险家就跑到大祭司那里,向他要求皮袄或水晶球,大祭司要他用金币来换,或者替他弄来其他的东西,...
2018-08-15 09:58:48 279
原创 Subway
You have just moved from a quiet Waterloo neighbourhood to a big, noisy city. Instead of getting to ride your bike to school every day, you now get to walk and take the subway. Because you don't want ...
2018-08-14 21:18:30 247
原创 堆模板
#include <stdio.h>#include <stdlib.h>int head[500],n;void shiftdown(int note){ while(note*2<=n)//如果不存在子节点 { int mi=head[note];//让最小值初始化为该节点 if(mi>head[no...
2018-08-14 16:27:42 173
原创 Candies
During the kindergarten days, flymouse was the monitor of his class. Occasionally the head-teacher brought the kids of flymouse’s class a large bag of candies and had flymouse distribute them. All the...
2018-08-14 14:57:27 711
原创 Invitation Cards
In the age of television, not many people attend theater performances. Antique Comedians of Malidinesia are aware of this fact. They want to propagate theater and, most of all, Antique Comedies. They ...
2018-08-13 20:59:11 322
转载 Arbitrage
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Problem DescriptionArbitrage is the use of discrep...
2018-08-07 18:53:31 1099
原创 MPI Maelstrom
BIT has recently taken delivery of their new supercomputer, a 32 processor Apollo Odyssey distributed shared memory machine with a hierarchical communication subsystem. Valentine McKee's research advi...
2018-08-07 12:34:43 165
原创 Wormholes
While exploring his many farms, Farmer John has discovered a number of amazing wormholes. A wormhole is very peculiar because it is a one-way path that delivers you to its destination at a time that i...
2018-08-07 10:01:52 432
原创 Cow Contest
N (1 ≤ N ≤ 100) cows, conveniently numbered 1..N, are participating in a programming contest. As we all know, some cows code better than others. Each cow has a certain constant skill rating that is un...
2018-08-05 10:54:45 374
原创 Silver Cow Party
One cow from each of N farms (1 ≤ N ≤ 1000) conveniently numbered 1..N is going to attend the big cow party to be held at farm #X (1 ≤ X ≤ N). A total of M (1 ≤ M ≤ 100,000) unidirectional (one-way ro...
2018-08-05 09:21:06 94
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人