自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

cf刷题随笔

刷cf的题目的时候顺便把答案记录一下

  • 博客(82)
  • 收藏
  • 关注

原创 HDU Today dhu-2112

Problem Description经过锦囊相助,海东集团终于度过了危机,从此,HDU的发展就一直顺风顺水,到了2050年,集团已经相当规模了,据说进入了钱江肉丝经济开发区500强。这时候,XHD夫妇也退居了二线,并在风景秀美的诸暨市浬浦镇陶姚村买了个房子,开始安度晚年了。这样住了一段时间,徐总对当地的交通还是不太了解。有时很郁闷,想去一个地方又不知道应该乘什么公交车,在什么地方转车,在什么...

2019-11-17 14:27:39 208

原创 畅通工程续hdu-1874

Problem Description某省自从实行了很多年的畅通工程计划后,终于修建了很多路。不过路多了也不好,每次要从一个城镇到另一个城镇时,都有许多种道路方案可以选择,而某些方案要比另一些方案行走的距离要短很多。这让行人很困扰。现在,已知起点和终点,请你计算出要从起点到终点,最短需要行走多少距离。Input本题目包含多组数据,请处理到文件结束。每组数据第一行包含两个正整数N...

2019-11-17 14:24:22 142

原创 hud2883--kebab

kebabTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2495Accepted Submission(s): 1141Problem DescriptionAlmost everyone likes kebab...

2019-11-12 16:28:58 279

原创 A. Elephant

A. Elephanttime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputAn elephant decided to visit his friend. It turned out that the elepha...

2019-09-18 23:57:09 317

原创 A. Beautiful Matrix

A. Beautiful Matrixtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou've got a5 × 5matrix, consisting of24zeroes and a sing...

2019-09-17 23:27:50 289

原创 A. Love "A"

A. Love "A"time limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstand...

2019-09-17 16:07:16 250

原创 A. Between the Offices

time limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputAs you may know, MemSQL has American offices in both San Francisco and Seattle. Be...

2019-09-17 15:42:10 124

原创 A. Vus the Cossack and a Contest

就是只要后两个数字都比前一个大就可以了#include <iostream>#include <cstdio>#include <cstdlib>#include <algorithm>#include <cmath>#include <map>#include <set>#include ...

2019-09-14 15:51:52 144

原创 A. Mahmoud and Ehab and the even-odd game

A. Mahmoud and Ehab and the even-odd gametime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputMahmoud and Ehab play a game called the ...

2019-09-14 15:08:20 133

原创 Left Right

题目Two players, Alice and Bob are playing a strange game in a1 x nboard. The cells are numbered from0ton-1, where the left most cell is marked as cell0. Each cell can contain at most one piece....

2019-08-19 10:21:19 253

原创 Incredible Chess

题目You are given ann x nchess board. Only pawn is used in the 'Incredible Chess' and they can move forward or backward. In each column there are two pawns, one white and one black. White pawns are ...

2019-08-16 19:01:39 107

原创 Partitioning Game

题目Alice and Bob are playing a strange game. The rules of the game are:1.Initially there arenpiles.2.A pile is formed by some cells.3.Alice starts the game and they alternat...

2019-08-16 17:49:07 125

原创 Be the Winner

题目Let's consider m apples divided into n groups. Each group contains no more than 100 apples, arranged in a line. You can take any number of consecutive apples at one time.For example "@@@" can be...

2019-08-16 17:34:52 81

原创 Matrix Game

题目Given anm x nmatrix, wheremdenotes the number of rows andndenotes the number of columns and in each cell a pile of stones is given. For example, let there be a2 x 3matrix, and the piles ar...

2019-08-16 17:11:45 861

原创 Misere Nim

题目Alice and Bob are playing game ofMisère Nim. Misère Nim is a game playing onkpiles of stones, each pile containing one or more stones. The players alternate turns and in each turn a player can ...

2019-08-16 16:46:14 137

原创 Being a Good Boy in Spring Festival

题目一年在外 父母时刻牵挂春节回家 你能做几天好孩子吗寒假里尝试做做下面的事情吧陪妈妈逛一次菜场悄悄给爸爸买个小礼物主动地 强烈地 要求洗一次碗某一天早起 给爸妈用心地做回早餐如果愿意 你还可以和爸妈说咱们玩个小游戏吧 ACM课上学的呢~下面是一个二人小游戏:桌子上有M堆扑克牌;每堆牌的数量分别为Ni(i=1…M);两人轮流进行;每走一步可以任意选择一堆并取...

2019-08-16 16:12:04 100

原创 取石子游戏 (斐波那契博弈)

题目1堆石子有n个,两人轮流取.先取者第1次可以取任意多个,但不能全部取完.以后每次取的石子数不能超过上次取子数的2倍。取完者胜.先取者负输出"Second win".先取者胜输出"First win".Input输入有多组.每组第1行是2<=n<2^31. n=0退出.Output先取者负输出"Second win". 先取者胜输出"First win"....

2019-08-16 15:13:24 384

原创 食物链

题目动物王国中有三类动物A,B,C,这三类动物的食物链构成了有趣的环形。A吃B, B吃C,C吃A。现有N个动物,以1-N编号。每个动物都是A,B,C中的一种,但是我们并不知道它到底是哪一种。有人用两种说法对这N个动物所构成的食物链关系进行描述:第一种说法是"1 X Y",表示X和Y是同类。第二种说法是"2 X Y",表示X吃Y。此人对N个动物,用上述两种说法,一句接一句地说出...

2019-08-16 14:50:55 494

原创 How Many Answers Are Wrong

题目TT and FF are ... friends. Uh... very very good friends -________-bFF is a bad boy, he is always wooing TT to play the following game with him. This is a very humdrum game. To begin with, TT sho...

2019-08-16 13:31:53 90

原创 How Many Tables

题目Today is Ignatius' birthday. He invites a lot of friends. Now it's dinner time. Ignatius wants to know how many tables he needs at least. You have to notice that not all the friends know each othe...

2019-08-16 11:52:03 72

原创 The Suspects

题目Severe acute respiratory syndrome (SARS), an atypical pneumonia of unknown aetiology, was recognized as a global threat in mid-March 2003. To minimize transmission to others, the best strategy is ...

2019-08-15 20:08:39 86

原创 Wireless Network

题目An earthquake takes place in Southeast Asia. The ACM (Asia Cooperated Medical team) have set up a wireless network with the lap computers, but an unexpected aftershock attacked, all computers in t...

2019-08-15 12:51:48 140

原创 Jungle Roads

题目The Head Elder of the tropical island of Lagrishan has a problem. A burst of foreign aid money was spent on extra roads between villages some years ago. But the jungle overtakes roads relentles...

2019-08-13 20:11:30 112

原创 Cow Contest

题目N(1 ≤N≤ 100) cows, conveniently numbered 1..N, are participating in a programming contest. As we all know, some cows code better than others. Each cow has a certain constant skill rating that i...

2019-08-13 13:17:41 77

原创 MPI Maelstrom

题目BIT has recently taken delivery of their new supercomputer, a 32 processor Apollo Odyssey distributed shared memory machine with a hierarchical communication subsystem. Valentine McKee's research ...

2019-08-13 10:12:19 64

原创 Wormholes

题目While exploring his many farms, Farmer John has discovered a number of amazing wormholes. A wormhole is very peculiar because it is a one-way path that delivers you to its destination at a time th...

2019-08-12 16:46:00 67

原创 Currency Exchange

题目Several currency exchange points are working in our city. Let us suppose that each point specializes in two particular currencies and performs exchange operations only with these currencies. There...

2019-08-09 10:42:26 1336 1

原创 Silver Cow Party

题目One cow from each ofNfarms (1 ≤N≤ 1000) conveniently numbered 1..Nis going to attend the big cow party to be held at farm #X(1 ≤X≤N). A total ofM(1 ≤M≤ 100,000) unidirectional (one-way...

2019-08-08 17:11:53 64

原创 Heavy Transportation

题目BackgroundHugo Heavy is happy. After the breakdown of the Cargolifter project he can now expand business. But he needs a clever man who tells him whether there really is a way from the place his...

2019-08-08 15:59:47 116

原创 Frogger

题目Freddy Frog is sitting on a stone in the middle of a lake. Suddenly he notices Fiona Frog who is sitting on another stone. He plans to visit her, but since the water is dirty and full of tourists'...

2019-08-08 13:32:46 94

原创 Marriage Match IV

题目Do not sincere non-interference。Like that show, now starvae also take part in a show, but it take place between city A and B. Starvae is in city A and girls are in city B. Every time starvae can...

2019-08-07 12:31:13 86

原创 Marriage Match II

题目Presumably, you all have known the question of stable marriage match. A girl will choose a boy; it is similar as the game of playing house we used to play when we are kids. What a happy time as so...

2019-08-07 12:26:00 106

原创 Escape

题目2012 If this is the end of the world how to do? I do not know how. But now scientists have found that some stars, who can live, but some people do not fit to live some of the planet. Now scientist...

2019-08-07 10:04:56 228

原创 Kakuro Extension

题目If you solved problem likethis, forget it.Because you need to use a completely different algorithm to solve the following one.Kakuro puzzle is played on a grid of "black" and "white" cells. Apa...

2019-08-07 09:26:30 208

原创 Leapin' Lizards

题目Your platoon of wandering lizards has entered a strange room in the labyrinth you are exploring. As you are looking around for hidden treasures, one of the rookies steps on an innocent-looking sto...

2019-08-06 17:35:51 128

原创 Control

题目You, the head of Department of Security, recently received a top-secret information that a group of terrorists is planning to transport some WMD1from one city (the source) to another one (the de...

2019-08-06 16:19:42 870

原创 Food

题目 You, a part-time dining service worker in your college’s dining hall, are now confused with a new problem: serve as many people as possible.  The issue comes up as people in your college are mo...

2019-08-06 10:33:22 132

原创 Island Transport

题目In the vast waters far far away, there are many islands. People are living on the islands, and all the transport among the islands relies on the ships.  You have a transportation company there. ...

2019-08-05 17:25:11 258

原创 Sabotage

题目The regime of a small but wealthy dictatorship has been abruptly overthrown by an unexpected rebellion. Because of the enormous disturbances this is causing in world economy, an imperialist milita...

2019-08-05 16:32:23 181

原创 Power Network

题目A power network consists of nodes (power stations, consumers and dispatchers) connected by power transport lines. A node u may be supplied with an amount s(u) >= 0 of power, may produce an amou...

2019-08-05 11:00:50 471

空空如也

空空如也

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

TA关注的人

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