摘要: 1001: [BeiJing2006]狼抓兔子 Description 现在小朋友们最喜欢的"喜羊羊与灰太狼",话说灰太狼抓羊不到,但抓兔子还是比较在行的, 而且现在的兔子还比较笨,它们只有两个窝,现在你做为狼王,面对下面这样一个网格的地形: 左上角点为(1,1),右下角点为(N,M)(上图中N=4 阅读全文
posted @ 2018-08-31 11:02 mizersy 阅读(172) 评论(0) 推荐(0) 编辑
摘要: 1098: [POI2007]办公楼biu Description FGD开办了一家电话公司。他雇用了N个职员,给了每个职员一部手机。每个职员的手机里都存储有一些同事的电话号码。由于FGD的公司规模不断扩大,旧的办公楼已经显得十分狭窄,FGD决定将公司迁至一些新的办公楼。FGD希望职员被安置在尽量多 阅读全文
posted @ 2018-08-30 21:18 mizersy 阅读(305) 评论(0) 推荐(0) 编辑
摘要: You are to write a program that has to decide whether a given line segment intersects a given rectangle. An example: line: start point: (4,9) end poin 阅读全文
posted @ 2018-08-30 19:20 mizersy 阅读(255) 评论(0) 推荐(0) 编辑
摘要: Count the string It is well known that AekdyCoin is good at string problems as well as number theory problems. When given a string s, we can write dow 阅读全文
posted @ 2018-08-30 09:47 mizersy 阅读(151) 评论(0) 推荐(0) 编辑
摘要: Simpsons’ Hidden Talents Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 14056 Accepted Submissio 阅读全文
posted @ 2018-08-29 21:29 mizersy 阅读(134) 评论(0) 推荐(0) 编辑
摘要: 1052: [HAOI2007]覆盖问题 Description 某人在山上种了N棵小树苗。冬天来了,温度急速下降,小树苗脆弱得不堪一击,于是树主人想用一些塑料薄 膜把这些小树遮盖起来,经过一番长久的思考,他决定用3个L*L的正方形塑料薄膜将小树遮起来。我们不妨将山建 立一个平面直角坐标系,设第i棵 阅读全文
posted @ 2018-08-29 14:55 mizersy 阅读(141) 评论(0) 推荐(0) 编辑
摘要: 1047: [HAOI2007]理想的正方形 Description 有一个a*b的整数组成的矩阵,现请你从中找出一个n*n的正方形区域,使得该区域所有数中的最大值和最小值的差最小。 有一个a*b的整数组成的矩阵,现请你从中找出一个n*n的正方形区域,使得该区域所有数中的最大值和最小值的差最小。 I 阅读全文
posted @ 2018-08-28 20:10 mizersy 阅读(112) 评论(0) 推荐(0) 编辑
摘要: 1087: [SCOI2005]互不侵犯King Description 在N×N的棋盘里面放K个国王,使他们互不攻击,共有多少种摆放方案。国王能攻击到它上下左右,以及左上左下右上右下八个方向上附近的各一个格子,共8个格子。 在N×N的棋盘里面放K个国王,使他们互不攻击,共有多少种摆放方案。国王能攻 阅读全文
posted @ 2018-08-28 16:37 mizersy 阅读(166) 评论(0) 推荐(0) 编辑
摘要: 构造一个图,左边n∗mn∗m个点,表示第jj个技术人员修的倒数第ii辆车,右边nn个点,表示第kk辆车 源点向左边的点连(w=1,cost=0)(w=1,cost=0)的边,因为每个人同一时刻只能修一辆车 左边m∗nm∗n个点再分别向右边nn个点连边,左边第(i,j)(i,j)个点向右边第kk个点连 阅读全文
posted @ 2018-08-28 15:17 mizersy 阅读(131) 评论(0) 推荐(0) 编辑
摘要: Reincarnation Time Limit: 6000/3000 MS (Java/Others) Memory Limit: 131072/65536 K (Java/Others)Total Submission(s): 4571 Accepted Submission(s): 1868 阅读全文
posted @ 2018-08-28 10:56 mizersy 阅读(215) 评论(0) 推荐(0) 编辑
摘要: Seek the Name, Seek the Fame Seek the Name, Seek the Fame The little cat is so famous, that many couples tramp over hill and dale to Byteland, and ask 阅读全文
posted @ 2018-08-27 19:19 mizersy 阅读(216) 评论(0) 推荐(0) 编辑
摘要: #include using namespace std; const int m = 110010; char s[m*2]; int mp[m*2]; char ma[2*m]; int l,len; void manacher(){ l = 0; ma[l++] = '$'; ma[l++] = '#'; for (int i = 0;i i ? min... 阅读全文
posted @ 2018-08-27 19:17 mizersy 阅读(133) 评论(0) 推荐(0) 编辑
摘要: YJJ's Salesman Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 253 Accepted Submission(s): 62 Pro 阅读全文
posted @ 2018-08-25 20:31 mizersy 阅读(802) 评论(0) 推荐(2) 编辑
摘要: Ignatius and the Princess III Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 25867 Accepted Subm 阅读全文
posted @ 2018-08-24 21:21 mizersy 阅读(140) 评论(0) 推荐(0) 编辑
摘要: Input Output Sample Input Sample Output 同类题目:HDU1358 #include <bits/stdc++.h> using namespace std; int n; char a[1000005]; int nxt[1000005]; void getn 阅读全文
posted @ 2018-08-24 16:11 mizersy 阅读(177) 评论(0) 推荐(0) 编辑