自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(16)
  • 收藏
  • 关注

原创 UVA10054

  Problem D: The Necklace My little sister had a beautiful necklace made of colorful beads. Two successive beads in the necklace shared a common color at their meeting point.

2014-07-24 10:24:34 508

原创 LA4255

Given a sequence of integers, a1, a2,..., an , we define its sign matrix S such that, for 1ijn , Sij = `` + " if ai +...+ aj > 0 ; Sij = `` - " if ai +...+ aj < 0 ; and Sij = ``0" otherwise.

2014-07-23 23:07:34 460

原创 UVA11624

Problem B: Fire! Joe works in a maze. Unfortunately, portions of the maze have caught on fire, and the owner of the maze neglected to create a fire escape plan. Help Joe escape the maze.Given

2014-07-20 20:55:34 486

原创 UVA10047

  Problem A: The Monocycle A monocycle is a cycle that runs on one wheel and the one we will be considering is a bit more special. It has a solid wheel colored with five different co

2014-07-20 20:34:16 390

原创 UVA_11300Spreading the Wealth

这道题目看起来很复杂,看了题目分析之后表示zhe

2014-07-13 09:59:20 352

原创 UVA_11729Commando War

思路:贪心的策略,让执行时间长的任务先做

2014-07-13 09:57:41 318

原创 UVA_10881 - Piotr's Ants

Problem DPiotr's AntsTime Limit: 2 seconds"One thing is for certain: there is no stopping them;the ants will soon be here. And I, for one, welcome ournew insect overlords."

2014-07-13 09:14:57 369

原创 AOJ-0121

Seven PuzzleTime Limit : 1 sec, Memory Limit : 65536 KBSeven Puzzle7パズルは8つの正方形のカードとこれらのカードがぴたりと収まる枠を使って行います。それぞれのカードは互いに区別できるように、0,1,2....7と番号がつけられています。枠には、縦に2個、横に4個のカードを並べることができます。

2014-04-12 11:50:12 531

原创 POJ-1948

Triangular PasturesTime Limit: 1000MS Memory Limit: 30000KTotal Submissions: 6124 Accepted: 1978DescriptionLike everyone, cows enjoy variety. Their current fancy

2014-04-11 22:03:15 466

原创 POJ-3669

Meteor ShowerTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 7755 Accepted: 2194DescriptionBessie hears that an extraordinary meteor shower is coming; r

2014-04-11 14:11:54 401

原创 POJ-3009

其实第一次看到这道题目,我会

2014-04-10 09:12:10 372

原创 LIS

Prob I. Just LISYou are to find the length of the longest increasing subsequence (LIS) of a given sequence A whose length is n.InputThere multiple test cases. Each case contains n+1 inte

2014-03-20 19:32:27 377

原创 POJ-1852

其实如果之前没有遇到过这种问题就是感到无从下手,本题实际不难。模拟两只蚂蚁相遇的情景,就会发现其实他们是“保持原样交错而过继续前进”(如果不考虑蚂蚁的个体差异),这样就可以认为每只蚂蚁是独立运动的。由于没有给出蚂蚁的朝向问题,所以要求最短时间时:首先针对每只蚂蚁求出它到竿子两个端点的最小距离,然后从所有蚂蚁的最小距离中求出最大的值(因为需要的是当所有的蚂蚁都下落的最小时间);要求最长时

2014-03-19 10:49:13 375

原创 最大连续子序列问题(含环路)

Prob III. More than MSPIn computer science, the maximum subarray problem is the task of finding the contiguous subarray within a one-dimensional array of numbers which has the largest sum. For examp

2014-03-19 10:34:01 556

原创 Pouring water

#include#include#include#define MAX 10000000using namespace std;int f[201][201][201];//用来存放到达某个状态所需倒的最少水量short inQ[201][201][201];//用来标记某个状态是否在队列中int main(){ queue q; short s[3], d;

2014-03-18 17:59:55 1067

原创 SPFA

#include#include#include#includeusing namespace std;#define MAXV 10000#define INF 1000000000 //此处建议不要过大或过小,过大易导致运算时溢出,过小可能会被判定为真正的距离using std::vector;using std::queue;struct Edge{ int v; /

2014-03-18 17:15:12 342

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除