自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

ACM!荣耀之路!

【已退役】

  • 博客(997)
  • 资源 (15)
  • 收藏
  • 关注

原创 POJ1644:To Bet or Not To Bet(概率DP)

DescriptionAlexander Charles McMillan loves to gamble, and during his last trip to the casino he ran across a new game. It is played on a linear sequence of squares as shown below. A chip is

2015-04-23 23:13:22 1505

原创 POJ1699:Best Sequence(DP)

DescriptionThe twenty-first century is a biology-technology developing century. One of the most attractive and challenging tasks is on the gene project, especially on gene sorting program. Recentl

2015-04-21 19:16:22 2547 1

原创 POJ1609:Tiling Up Blocks(DP)

DescriptionMichael The Kid receives an interesting game set from his grandparent as his birthday gift. Inside the game set box, there are n tiling blocks and each block has a form as follows: 

2015-04-21 16:25:13 1473

原创 URAL1965:Pear Trees(DP)

Vova was walking along one of Shenzhen streets when he noticed young pear trees, growing along the pavement. Each tree had a plaque attached to it containing some number. Vova walked around all n tree

2015-04-20 02:44:42 1750 1

原创 URAL1964:Chinese Dialects

Vova moved from Guangzhou to Shenzhen. He immediately found out that the local people don't understand his Cantonese phrases as well. Vova tried chatting with them in Mandarin, but to no success.

2015-04-19 22:28:50 1224

原创 URAL1962:In Chinese Restaurant(并查集)

When Vova arrived in Guangzhou, his Chinese friends immediately invited him to a restaurant. Overalln people came to the restaurant, including Vova. The waiter offered to seat the whole company at a

2015-04-19 22:21:38 1280

原创 URAL1961:Cantonese Dialect

After some thought on where to spend a holiday Vova decided to travel around South China and visit Guangzhou, Shenzhen, Macau and Hong Kong.Vova heard that South China speaks the Cantonese dia

2015-04-19 21:59:51 1218 3

原创 Codeforces534E:Berland Local Positioning System

In Berland a bus travels along the main street of the capital. The street begins from the main square and looks like a very long segment. There are n bus stops located along the street, the i-th of

2015-04-18 20:25:05 1431

原创 Codeforces534D:Handshakes

On February, 30th n students came in the Center for Training Olympiad Programmers (CTOP) of the Berland State University. They came one by one, one after another. Each of them went in, and before si

2015-04-18 20:19:27 1181

原创 Codeforces534C:Polycarpus' Dice

Polycarp has n dice d1, d2, ..., dn. The i-th dice shows numbers from 1 to di. Polycarp rolled all the dice and the sum of numbers they showed is A. Agrippina didn't see which dice showed what num

2015-04-18 20:14:01 1490

原创 Codeforces534B:Covered Path

The on-board computer on Polycarp's car measured that the car speed at the beginning of some section of the path equals v1 meters per second, and in the end it is v2 meters per second. We know tha

2015-04-18 20:09:02 1291

原创 Codeforces534A:Exam

An exam for n students will take place in a long and narrow room, so the students will sit in a line in some order. The teacher suspects that students with adjacent numbers (i and i + 1) always stud

2015-04-18 20:04:34 1521

原创 codeforces535D:Tavas and Malekas(KMP)

Tavas is a strange creature. Usually "zzz" comes out of people's mouth while sleeping, but string s of length n comes out from Tavas' mouth instead.Today Tavas fell asleep in Malekas' place. W

2015-04-16 23:22:16 2246

原创 codeforces535C:Tavas and Karafs(二分)

Karafs is some kind of vegetable in shape of an 1 × h rectangle. Tavaspolis people love Karafs and they use Karafs in almost any kind of food. Tavas, himself, is crazy about Karafs.Each Karafs

2015-04-16 23:12:52 2410

原创 codeforces535B:Tavas and SaDDas

Once again Tavas started eating coffee mix without water! Keione told him that it smells awful, but he didn't stop doing that. That's why Keione told his smart friend, SaDDas to punish him! SaDDas too

2015-04-16 23:07:45 8088

原创 codeforces535A:Tavas and Nafas

Today Tavas got his test result as an integer score and he wants to share it with his girlfriend, Nafas.His phone operating system is Tavdroid, and its keyboard doesn't have any digits! He wants t

2015-04-16 23:06:24 1266

原创 POJ1189:钉子和小球(DP)

Description有一个三角形木板,竖直立放,上面钉着n(n+1)/2颗钉子,还有(n+1)个格子(当n=5时如图1)。每颗钉子和周围的钉子的距离都等于d,每个格子的宽度也都等于d,且除了最左端和最右端的格子外每个格子都正对着最下面一排钉子的间隙。 让一个直径略小于d的小球中心正对着最上面的钉子在板上自由滚落,小球每碰到一个钉子都可能落向左边或右边(概率各1/2),且球的中心还会正

2015-04-15 22:12:54 1924

原创 POJ1178:Camelot(FLOYD+DP)

DescriptionCenturies ago, King Arthur and the Knights of the Round Table used to meet every year on New Year's Day to celebrate their fellowship. In remembrance of these events, we consider a boar

2015-04-15 21:06:09 1654

原创 ZOJ3862:Intersection

Edward has 2n points on the plane conveniently labeled with 1,2,…,2n. Each point is connected exactly with another point by a segment.Edward finds that some segments intersecting with some others. S

2015-04-13 18:54:42 1776

原创 ZOJ3868:GCD Expectation

Edward has a set of n integers {a1, a2,...,an}. He randomly picks a nonempty subset {x1, x2,…,xm} (each nonempty subset has equal probability to be picked), and would like to know the expectation of

2015-04-13 00:23:00 1816

原创 ZOJ3864:Quiz for EXO-L(BFS)

Exo (Korean: 엑소; Chinese:爱咳嗽; often stylized as EXO) is a Chinese-South Korean boy band based in Seoul, South Korea. Formed by SM Entertainment in 2011, the group consists of twelve members separate

2015-04-12 23:00:52 2223

原创 ZOJ3865:Superbot(BFS)

Superbot is an interesting game which you need to control the robot on an N*M grid map.As you see, it's just a simple game: there is a control panel with four direction left (1st position), right

2015-04-12 22:53:29 1239

原创 ZOJ3861:Valid Pattern Lock(DFS)

Pattern lock security is generally used in Android handsets instead of a password. The pattern lock can be set by joining points on a 3 × 3 matrix in a chosen order. The points of the matrix are reg

2015-04-12 22:25:57 1658 2

原创 ZOJ3867:Earthstone: Easy Version

Earthstone is a famous online card game created by Lizard Entertainment. It is a collectible card game that revolves around turn-based matches between two opponents. Players start the game with a su

2015-04-12 22:20:42 1386

原创 ZOJ3860:Find the Spy

Whoooa! There is a spy in Marjar University. All we know is that the spy has a special ID card. Please find him out!InputThere are multiple test cases. The first line of input contains an integer 

2015-04-12 22:19:00 1458

原创 CSU1566: The Maze Makers(BFS)

DescriptionThe Maze Makers is a publisher of puzzle books. One of their most popular series is maze books. They have a program that generates rectangular two-dimensional mazes like the one shown

2015-04-07 16:31:19 1075

原创 CSU1565: Word Cloud

DescriptionA word cloud (or tag cloud) is a visual representation of textual data based on a weighted metric. In the above cloud (which is based on this year's list of Mid-Central teams), the fo

2015-04-07 16:16:41 1259

原创 CSU1563:Lexicography(数学)

DescriptionAn anagram of a string is any string that can be formed using the same letters as the original. (We consider the original string an anagram of itself as well.) For example, the string

2015-04-07 16:02:11 1214

原创 CSU1567:Reverse Rot(DFS)

DescriptionAmerican Carnival Makers Inc. (ACM) has a long history of designing rides and attractions. One of their more popular attractions is a fun house that includes a room of mirrors. Their

2015-04-07 15:56:30 1179

原创 FZU2127:养鸡场

Problem DescriptionJason买来了n米长的竹篱笆,打算将n米长的竹篱笆全部用来围成一个三角形的养鸡场。为方便起见,养鸡场三条边的长度都为正整数。同时,他想让自己的养鸡场看起来更美观一些,要求三条边的长度分别在一个区间范围内。现在,他想知道有多少种不同的方案使得围成的养鸡场满足要求? Input输入包含多组数据。输入数据第一行是一个正整数n,表示竹篱笆

2014-12-17 10:27:59 1819

原创 FZU2125:简单的等式

Problem Description现在有一个等式如下:x^2+s(x,m)x-n=0。其中s(x,m)表示把x写成m进制时,每个位数相加的和。现在,在给定n,m的情况下,求出满足等式的最小的正整数x。如果不存在,请输出-1。 Input有T组测试数据。以下有T(T Output输出T行,有1个数字,满足等式的最小的正整数x。如果不存在,请输出-1。 Samp

2014-12-17 10:27:18 1584

原创 FZU2126:消去游戏(DP)

Problem DescriptionS最近在玩一种游戏。这种游戏的规则是一个一个地往一个栈里放有颜色的球,当栈顶连续k个球颜色相同时,这k个球立刻同时消失。现在S已经往栈里放了n个球,他想知道再放m个球,然后使得栈里的球都被消去的放法有多少种。两种放法不同是指存在放的第i个球这两种放法放的球的颜色不同。由于方法数可能很多,将答案mod 1000000007。 Input输入包

2014-12-17 10:22:02 1325

原创 ZOJ3662:Math Magic(完全背包)

Yesterday, my teacher taught us about math: +, -, *, /, GCD, LCM... As you know, LCM (Least common multiple) of two positive numbers can be solved easily because of a * b = GCD (a, b) * LCM (a, b).

2014-12-15 22:57:55 1973

原创 ZOJ3524:Crazy Shopping(拓扑排序+完全背包)

Because of the 90th anniversary of the Coherent & Cute Patchouli (C.C.P), Kawashiro Nitori decides to buy a lot of rare things to celebrate.Kawashiro Nitori is a very shy kappa (a type of wate

2014-12-15 22:45:48 2146 1

原创 ZOJ3623:Battle Ships(完全背包)

Battle Ships is a new game which is similar to Star Craft. In this game, the enemy builds a defense tower, which has L longevity. The player has a military factory, which can produce N kinds of batt

2014-12-15 22:39:06 1862

原创 HDU4101:Ali and Baba(BFS)

Problem DescriptionThere is a rectangle area (with N rows and M columns) in front of Ali and Baba, each grid might be one of the following:1. Empty area, represented by an integer 0.2. A Stone

2014-12-13 14:10:34 1113

原创 HDU3533:Escape(BFS)

Problem DescriptionThe students of the HEU are maneuvering for their military training.The red army and the blue army are at war today. The blue army finds that Little A is the spy of the red ar

2014-12-13 13:59:14 4307

原创 hdu2614:Beat(dfs)

Problem DescriptionZty is a man that always full of enthusiasm. He wants to solve every kind of difficulty ACM problem in the world. And he has a habit that he does not like to solvea problem th

2014-12-13 13:36:51 2710

原创 HDU2102:A计划(BFS)

Problem Description可怜的公主在一次次被魔王掳走一次次被骑士们救回来之后,而今,不幸的她再一次面临生命的考验。魔王已经发出消息说将在T时刻吃掉公主,因为他听信谣言说吃公主的肉也能长生不老。年迈的国王正是心急如焚,告招天下勇士来拯救公主。不过公主早已习以为常,她深信智勇的骑士LJ肯定能将她救出。现据密探所报,公主被关在一个两层的迷宫里,迷宫的入口是S(0,0,0),公主

2014-12-13 13:32:20 3462

原创 HDU3309:Roll The Cube(BFS)

Problem DescriptionThis is a simple game.The goal of the game is to roll two balls to two holes each.'B' -- ball'H' -- hole'.' -- land'*' -- wallRemember when a ball rolls into a hole, t

2014-12-11 20:54:24 1548

《数值分析》课后答案

《数值分析》课后答案

2015-07-02

离散数学第四版_课后答案

离散数学第四版_课后答案

2015-07-02

JSP毕业设计

完整的毕业设计,代码+文档

2015-06-29

动态规划32讲

动态规划32讲

2013-12-29

最全的C++函数库

C++函数库

2013-12-29

编译原理

编译原理

2013-12-29

《数据结构》课程设计公园导游图

《数据结构》课程设计公园导游图

2013-12-29

代码行统计工具

代码行统计工具

2013-06-08

《数据结构》 严蔚敏的全部代码实现(C语言)

《数据结构》 严蔚敏的全部代码实现

2013-06-08

ACM必做50题

ACM必做50题的解题

2013-06-08

C/C++函数大全

函数大全

2013-06-08

背包九讲(背包)

背包九讲

2013-06-08

叶核亚 java程序设计实用教程 第三版课后答案

Java程序设计实用教程(第3版) (叶核亚) 电子工业出版社 案例及素材

2013-03-09

计算机程序设计艺术

非常有用的专业书籍! 很有用!

2012-10-20

空空如也

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

TA关注的人

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