HDU 3649 New Game
题目大意:
首先告诉你0或1,0表示红色先手,1表示黑色先手,接下来四个数字表示 红方 A,B,C,D四个子的位置,在接下来四个数字表示黑方 A,B,C,D四个子的位置。
游戏规则如下:
(1) the piece red acm can be placed on A1~,A2,A3,A4,A5;the piece black acm A6~A10;
(2) the piece red bahamas can place on B1~B5; the piece bla...
分类:
其他好文 时间:
2014-06-05 04:21:31
阅读次数:
295
链接: http://acm.hrbust.edu.cn/index.php?m=ProblemSet&a=showProblem&problem_id=2116
Description
Wind and his GF(game friend) are playing a small game. They use the computer to randomly generated a nu...
分类:
其他好文 时间:
2014-06-03 02:17:13
阅读次数:
252
题目链接:
http://acm.hdu.edu.cn/showproblem.php?pid=1525
Euclid's Game
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)
Total Submission(s): 1832 Accepted S...
分类:
其他好文 时间:
2014-06-03 01:38:06
阅读次数:
255
以前用树状数组做过一次,现在用线段树再刷一次。。。
首先必须先离散化。。。
然后建立2颗线段树,第一颗表示往左走,每个节点的值的分布。
第二颗表示往右走,每个节点的值的分布。
然后根据左右走的关系,判断出x,y的值。
#pragma comment(linker, "/STACK:1024000000,1024000000")
#include
#include
#inclu...
分类:
其他好文 时间:
2014-06-03 01:25:54
阅读次数:
315
初一八班羽毛球比赛报名表负责人:谭天俊、梁晋浠、林曦男子单打:女子单打:男子双打:女子单打:混双:
分类:
其他好文 时间:
2014-06-02 22:16:11
阅读次数:
362
DescriptionA brand-new Japanese puzzle is
coming from the East to strike the world-popular Sudoku game and become an
international hit. The rules of t...
分类:
其他好文 时间:
2014-06-02 20:44:37
阅读次数:
303
【题目】
Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center).
For example, this binary tree is symmetric:
1
/ 2 2
/ \ / 3 4 4 3
But the following is not:
1
/ 2 2
\ 3 3
No...
分类:
其他好文 时间:
2014-06-02 10:56:14
阅读次数:
237
题意:给出两个01字符串s1,s2.每次改变s1上m个位置的字符。问k步之后使得s1变为s2的方法有多少种。
解法:DP,关键是状态的设计。考虑还是唯一性和可传递性。dp[i][j]表示第i步后有j个不同到目标的走法数。记忆化搜索dp[0][dif](dif表示初始时不同字符的个数)。转移时候枚举选择情况即可。
代码:/*****************************...
分类:
其他好文 时间:
2014-06-02 04:58:01
阅读次数:
216
The Game of Coins
mark:
#include"cstdio"
#include"iostream"
#include"queue"
#include"algorithm"
#include"set"
#include"queue"
#include"cmath"
#include"string.h"
#include"vector...
分类:
其他好文 时间:
2014-06-01 13:58:31
阅读次数:
196
.histroyMsgSearch{ background:#Fff; text-align: center; }
CSS 如何使DIV层水平居中
今天用CSS碰到个很棘手的问题,DIV本身没有定义自己居中的属性,
网上很多的方法都是介绍用上级的text-align: center然后嵌套一层DIV来解决问题.
可是事实上这样的方法科学吗?
经过网络搜索和亲自实验得出以下结论:
...
分类:
其他好文 时间:
2014-06-01 03:39:24
阅读次数:
325