自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 POJ Nim(2068)

DescriptionLet's play a traditional game Nim. You and I are seated across a table and we have a hundred stones on the table (we know the number of stones exactly). We play in turn and at each turn,

2014-04-30 20:15:00 654

原创 BZOJ [SCOI2008]着色方案

Description有n个木块排成一行,从左到右依次编号为1~n。你有k种颜色的油漆,其中第i种颜色的油漆足够涂ci个木块。所有油漆刚好足够涂满所有木块,即c1+c2+...+ck=n。相邻两个木块涂相同色显得很难看,所以你希望统计任意两个相邻木块颜色不同的着色方案。Input第一行为一个正整数k,第二行包含k个整数c1, c2, ... , ck。Output

2014-04-30 13:26:38 918

原创 HDU AreYouBusy

Problem DescriptionHappy New Term!As having become a junior, xiaoA recognizes that there is not much time for her to AC problems, because there are some other things for her to do, which makes her

2014-04-29 13:29:40 631

原创 HDU How far away ?

Problem DescriptionThere are n houses in the village and some bidirectional roads connecting them. Every day peole always like to ask like this "How far is it if I want to go from house A to house B

2014-04-29 11:40:21 487

原创 BZOJ [Usaco2008 Oct]牧场行走

DescriptionN头牛(2Input*第一行:两个被空格隔开的整数:N和Q *第二行到第n行:第i+1行有两个被空格隔开的整数:AI,BI,LI*第n+1行到n+Q行:每一行有两个空格隔开的整数:P1,P2,表示两头奶牛的编号。Output*第1行到第Q行:每行输出一个数,表示那两头奶牛之间的距离。Sample Input4 2

2014-04-29 10:57:16 891

原创 HDU Just a Hook

Problem DescriptionIn the game of DotA, Pudge’s meat hook is actually the most horrible thing for most of the heroes. The hook is made up of several consecutive metallic sticks which are of the same

2014-04-28 13:19:24 728

原创 POJ A Chess Game

DescriptionLet's design a new chess game. There are N positions to hold M chesses in this game. Multiple chesses can be located in the same position. The positions are constituted as a topological g

2014-04-26 17:51:39 667

原创 CF 424C Magic Formulas

People in the Tomskaya region like magic formulas very much. You can see some of them below.Imagine you are given a sequence of positive integer numbers p1,p2, ...,pn. Lets write down some mag

2014-04-26 15:56:36 730

原创 POJ Crosses and Crosses

DescriptionThe game of Crosses and Crosses is played on the field of 1 × n cells. Two players make moves in turn. Each move the player selects any free cell on the field and puts a cross ‘×’ to it

2014-04-24 20:29:22 637

原创 POJ S-Nim

DescriptionArthur and his sister Caroll have been playing a game called Nim for some time now. Nim is played as follows:The starting position has a number of heaps, all containing some, not nece

2014-04-22 19:16:34 645

原创 poj A Funny Game

DescriptionAlice and Bob decide to play a funny game. At the beginning of the game they pick n(1 6) coins in a circle, as Figure 1 shows. A move consists in removing one or two adjacent coins, lea

2014-04-22 16:17:53 676

原创 POJ 炮兵阵地

Description司令部的将军们打算在N*M的网格地图上部署他们的炮兵部队。一个N*M的地图由N行M列组成,地图的每一格可能是山地(用"H" 表示),也可能是平原(用"P"表示),如下图。在每一格平原地形上最多可以布置一支炮兵部队(山地上不能够部署炮兵部队);一支炮兵部队在地图上的攻击范围如图中黑色区域所示: 如果在地图中的灰色所标识的平原上部署一支炮兵部队,则图中的黑色的

2014-04-22 13:10:56 745

原创 POJ Nim (2975)

DescriptionNim is a 2-player game featuring several piles of stones. Players alternate turns, and on his/her turn, a player’s move consists of removing one or more stones from any single pile. P

2014-04-11 13:10:30 704

原创 POJ Matches Game

DescriptionHere is a simple game. In this game, there are several piles of matches and two players. The two player play in turn. In each turn, one can choose a pile and take away arbitrary number

2014-04-10 16:30:29 529

原创 POJ A New Stone Game

DescriptionAlice and Bob decide to play a new stone game.At the beginning of the game they pick n(1At each step of the game,the player choose a pile,remove at least one stones,then freely move s

2014-04-10 16:18:55 984

原创 POJ Cellular Automaton

DescriptionA cellular automaton is a collection of cells on a grid of specified shape that evolves through a number of discrete time steps according to a set of rules that describe the new state

2014-04-09 17:21:07 599

原创 快速幂水题集

一、转圈游戏

2014-04-08 18:53:30 1417

原创 wikioi Fibonacci数列(poj 3070)

题目描述 Description定义:f0=f1=1, fn=fn-1+fn-2(n>=2)。{fi}称为Fibonacci数列。输入n,求fn mod q。其中1输入描述 Input Description第一行一个数T(1以下T行,每行两个数,n,q(n9, 1输出描述 Output Description

2014-04-08 17:31:42 684

原创 HDU Print Article

Problem DescriptionZero has an old printer that doesn't work well sometimes. As it is antique, he still like to use it to print articles. But it is too old to work for a long time and it will certai

2014-04-03 13:32:58 575

原创 HDU Scaring the Birds

Problem DescriptionIt’s harvest season now! Farmer John plants a lot of corn. There are many birds living around his corn field. These birds keep stealing his corn all the time. John can't stand w

2014-04-02 18:20:24 759

原创 HDU 敌兵布阵

Problem DescriptionC国的死对头A国这段时间正在进行军事演习,所以C国间谍头子Derek和他手下Tidy又开始忙乎了。A国在海岸线沿直线布置了N个工兵营地,Derek和Tidy的任务就是要监视这些工兵营地的活动情况。由于采取了某种先进的监测手段,所以每个工兵营地的人数C国都掌握的一清二楚,每个工兵营地的人数都有可能发生变动,可能增加或减少若干人手,但这些都逃不过C国的监视。

2014-04-01 11:07:51 576

原创 wikioi 开关灯

题目描述 Description    YYX家门前的街上有N(2输入描述 Input Description第 1 行: 用空格隔开的两个整数N和M第 2..M+1 行: 每行表示一个操作, 有三个用空格分开的整数: 指令号(0代表按下开关,1代表询问状态), x 和 y 输出描述 Output Description

2014-04-01 10:49:18 575

空空如也

空空如也

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

TA关注的人

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