自定义博客皮肤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)
  • 收藏
  • 关注

原创 poj 1845 Sumdiv

Description Consider two natural numbers A and B. Let S be the sum of all natural divisors of A^B. Determine S modulo 9901 (the rest of the division of S by 9901). Input The only line contains

2016-05-25 21:45:06 197

原创 Zero Sum(DFS)

Problem Description:          Consider the sequence of digits from 1 through N (where N=9) in increasing order: 1 2 3 ... N.  Now insert either a '+' for addition or a '-' for subtraction or

2016-05-10 20:30:37 361

原创 hdu 1181

Problem Description 呃......变形课上Harry碰到了一点小麻烦,因为他并不像Hermione那样能够记住所有的咒语而随意的将一个棒球变成刺猬什么的,但是他发现了变形咒语的一个统一规律:如果咒语是以a开头b结尾的一个单词,那么它的作用就恰好是使A物体变成B物体.  Harry已经将他所会的所有咒语都列成了一个表,他想让你帮忙计算一下他是否能完成老师的作业,将一个B(ba

2016-05-10 19:08:02 280

原创 hdu3355 Bomb

Description The counter-terrorists found a time bomb in the dust. But this time the terrorists improve on the time bomb. The number sequence of the time bomb counts from 1 to N. If the current number

2016-05-03 13:08:02 269

原创 hdu 2089 不要62

Description 杭州人称那些傻乎乎粘嗒嗒的人为62(音:laoer)。  杭州交通管理局经常会扩充一些的士车牌照,新近出来一个好消息,以后上牌照,不再含有不吉利的数字了,这样一来,就可以消除个别的士司机和乘客的心理障碍,更安全地服务大众。  不吉利的数字为所有含有4或62的号码。例如:  62315 73418 88914  都属于不吉利号码。但是,61152虽然含有6和2,但不

2016-05-03 13:05:41 270

原创 一道耗时间的水题

点击打开链接 Problem Description:     Do you know how to read the phone numbers in English? Now let me tell you. For example, In China, the phone numbers are 11 digits, like: 15012233444. S

2016-05-03 00:08:41 213

原创 POJ 3279 Fliptile

Description Farmer John knows that an intellectually satisfied cow is a happy cow who will give more milk. He has arranged a brainy activity for cows in which they manipulate an M × N grid (1 ≤ M ≤ 1

2016-05-02 12:57:28 172

原创 POJ 1321 棋盘问题

Description 在一个给定形状的棋盘(形状可能是不规则的)上面摆放棋子,棋子没有区别。要求摆放时任意的两个棋子不能放在棋盘中的同一行或者同一列,请编程求解对于给定形状和大小的棋盘,摆放k个棋子的所有可行的摆放方案C。 Input 输入含有多组测试数据。  每组数据的第一行是两个正整数,n k,用一个空格隔开,表示了将在一个n*n的矩阵内描述棋盘,以及摆放棋子的数目。 n <= 8

2016-05-02 12:54:36 196

原创 hdu2859 Phalanx

Description 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

2016-05-02 12:47:07 342

原创 poj3136 Milking Time

Description Bessie is such a hard-working cow. In fact, she is so focused on maximizing her productivity that she decides to schedule her next N (1 ≤ N ≤ 1,000,000) hours (conveniently labeled 0..N-1

2016-05-02 12:45:15 163

原创 hdu1078 FatMouse and Cheese

Description FatMouse has stored some cheese in a city. The city can be considered as a square grid of dimension n: each grid location is labelled (p,q) where 0 <= p < n and 0 <= q < n. At each grid l

2016-05-02 12:42:06 198

原创 poj3186 Treats for the Cows

FJ has purchased N (1 The treats are interesting for many reasons: The treats are numbered 1..N and stored sequentially in single file in a long box that is open at both ends. On any day, FJ ca

2016-05-02 12:35:49 196

原创 hdu1176 免费馅饼

把这道题看成是二维的会很好做,状态转移方程为dp[j][i+1]=max(dp[j][i],dp[j+1][i],dp[j-1][i])+a[j][i+1];dp[i][j]表示第i秒在j位置最多能获得多少馅饼,如果不能到打j位置dp[i][j]=-INF

2016-05-02 11:34:52 148

原创 hdu1069 Monkey and Banana

一个长方体有6个面(有三个面是互不相同的),把他们的一条边先排好序,让后就是动态规划里的最长有序子序列。

2016-05-02 11:20:37 195

原创 POJ 3126 Prime Path

#include #include #include #include #define INF 0x3f3f3f3f struct abcd {     int p;     int step; }s[50000]; int prime[10005]; int num[5]; int a[10005]; int n,m; int ans=-1;

2016-05-01 20:22:37 180

原创 POJ 2251 Dungeon Master 搜索入门题

#include #include #include #include #define INF 0x3f3f3f3f struct abcd {     int a,b,c;     int step; }s[50000]; char maze[50][50][50]; int ok[50][50][50]; int go[6][3]={{1

2016-05-01 19:07:54 364

空空如也

空空如也

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

TA关注的人

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