自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 Aizu 2224

Description Nicholas Y. Alford was a cat lover. He had a garden in a village and kept many cats in his garden. The cats were so cute that people in the village also loved them.One day, an evil witch v

2016-07-31 20:27:19 259

原创 POJ 3268

One cow from each of N farms (1 ≤ N ≤ 1000) conveniently numbered 1..N is going to attend the big cow party to be held at farm #X (1 ≤ X ≤ N). A total of M (1 ≤ M ≤ 100,000) unidirectional (one-way roa

2016-07-31 15:40:28 263

原创 poj 1061 青蛙的约会

青蛙的约会 Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 105956 Accepted: 20928 Description两只青蛙在网上相识了,它们聊得很开心,于是觉得很有必要见一面。它们很高兴地发现它们住在同一条纬度线上,于是它们约定各自朝西跳,直到碰面为止。可是它们出发之前忘记了一件很重要的事

2016-07-31 12:13:12 460

原创 UVA 11624 Fire!

Joe works in a maze. Unfortunately, portions of the maze have caught on fire, and the owner of the maze neglected to create a fire escape plan. Help Joe escape the maze. Given Joe’s location in the

2016-07-29 21:07:48 362

原创 HDU 2612

Find a way Time Limit: 3000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 10345 Accepted Submission(s): 3374Problem Description Pass a year learning in H

2016-07-29 17:14:15 222

原创 POJ 3279 Fliptile

Fliptile Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 7372 Accepted: 2780 DescriptionFarmer John knows that an intellectually satisfied cow is a happy cow who will give more m

2016-07-29 15:02:56 279

原创 HDU 1242

Rescue Time Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64u SubmitStatus Description Angel was caught by the MOLIGPY! He was put in prison by Moligpy. The prison is describe

2016-07-29 09:16:36 288

原创 poj 2082 Terrible Sets

Terrible Sets Time Limit: 1000MS Memory Limit: 30000K Total Submissions: 4373 Accepted: 2268 DescriptionLet N be the set of all natural numbers {0 , 1 , 2 , … }, and R be the set of all rea

2016-07-28 23:17:23 233

原创 HDU 2553(n皇后)

Description 在N*N的方格棋盘放置了N个皇后,使得它们不相互攻击(即任意2个皇后不允许处在同一排,同一列,也不允许处在与棋盘边框成45角的斜线上。 你的任务是,对于给定的N,求出有多少种合法的放置方法。 Input 共有若干行,每行一个正整数N≤10,表示棋盘和皇后的数量;如果N=0,表示结束。Output 共有若干行,每行一个正整数,表示对应输入行的皇后的不同放置数量。Sam

2016-07-28 21:56:32 300

原创 HDU 1213

Description There is a rectangular room, covered with square tiles. Each tile is colored either red or black. A man is standing on a black tile. From a tile, he can move to one of four adjacent tiles.

2016-07-28 21:34:29 215

原创 HDU 1181

变形课 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 131072/65536 K (Java/Others) Total Submission(s): 21284 Accepted Submission(s): 7675Problem Description 呃……变形课上Harry碰到了一点小麻烦,因为他并不像Herm

2016-07-28 14:14:24 190

原创 CodeForces 670D2 Magic Powder - 2

Description The term of this problem is the same as the previous one, the only exception — increased restrictions.Input The first line contains two positive integers n and k (1 ≤ n ≤ 100 000, 1 ≤ k ≤

2016-07-27 21:52:54 360

原创 POJ 3253

我们的小伙伴Bingo真的很调皮,他在上课的路上看到树上有个鸟窝,他就想去把他捅下来,但是鸟窝很高他够不到,于是他就到处找木棍,想把这些木棍接在一起,然后去捅鸟窝。他一共找了N跟木棍 (1 ≤ N ≤ 20,000),每根木棍的长度为 Li (1 ≤ Li ≤ 50,000) 。现在他要把这N根木棍连接在一起,每次连接只能把两根木棍连在一起,而且每连接一次都需要花费一些money去买材料,买这些材料

2016-07-27 21:40:04 282

原创 HDU 1896

Description Because of the wrong status of the bicycle, Sempr begin to walk east to west every morning and walk back every evening. Walking may cause a little tired, so Sempr always play some games th

2016-07-27 21:36:07 429

原创 HDU 1873

Description 看病要排队这个是地球人都知道的常识。 不过经过细心的0068的观察,他发现了医院里排队还是有讲究的。0068所去的医院有三个医生(汗,这么少)同时看病。而看病的人病情有轻重,所以不能根据简单的先来先服务的原则。所以医院对每种病情规定了10种不同的优先级。级别为10的优先权最高,级别为1的优先权最低。医生在看病时,则会在他的队伍里面选择一个优先权最高的人进行诊治。如果遇到

2016-07-27 21:30:45 340

原创 Codeforces 612C

Description You are given string s consists of opening and closing brackets of four kinds <>, {}, [], (). There are two types of brackets: opening and closing. You can replace any bracket by another o

2016-07-27 21:21:42 474

原创 POJ 1363

Description There is a famous railway station in PopPush City. Country there is incredibly hilly. The station was built in last century. Unfortunately, funds were extremely limited that time. It was p

2016-07-27 21:07:33 219

原创 HDU 1702

Description ACboy was kidnapped!! he miss his mother very much and is very scare now.You can’t image how dark the room he was put into is, so poor :(. As a smart ACMer, you want to get ACboy out o

2016-07-27 21:03:32 346

转载 栈与队列

1、stack stack 模板类的定义在头文件中。 stack 模板类需要两个模板参数,一个是元素类型,一个容器类型,但只有元素类型是必要 的,在不指定容器类型时,默认的容器类型为deque。 定义stack 对象的示例代码如下: stack s1; stack s2; stack 的基本操作有: 入栈,如例:s.push(x); 出栈,如例:s.pop();注意,出栈操作只是删

2016-07-25 13:48:40 173

原创 HDU 4135 Co-prime

Co-prime Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 3507 Accepted Submission(s): 1388Problem Description Given a number N, you are as

2016-07-24 15:50:00 229

原创 POJ 1995 Raising Modulo Numbers

Raising Modulo Numbers Time Limit:1000MS Memory Limit:30000KB 64bit IO Format:%lld & %llu SubmitStatus Description People are different. Some secretly read magazines full of interesting gir

2016-07-23 16:51:20 225

原创 POJ 1328 Radar Installation

Radar Installation Time Limit:1000MS Memory Limit:10000KB 64bit IO Format:%lld & %llu SubmitStatus Description Assume the coasting is an infinite straight line. Land is in one side of coast

2016-07-23 16:31:11 266

原创 CodeForces 629B Far Relative’s Problem

Far Relative’s Problem Time Limit:2000MS Memory Limit:262144KB 64bit IO Format:%I64d & %I64u SubmitStatus Description Famil Door wants to celebrate his birthday with his friends from Far Fa

2016-07-23 16:09:08 294

原创 CodeForces 698A Vacations

I - Vacations Time Limit:1000MS Memory Limit:262144KB 64bit IO Format:%I64d & %I64u SubmitStatus Description Vasya has n days of vacations! So he decided to improve his IT skills and do spo

2016-07-23 15:55:27 292

原创 HDU 1052 Tian Ji -- The Horse Racing

Tian Ji – The Horse Racing Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 26282 Accepted Submission(s): 7742Problem Description Here is a

2016-07-23 15:45:17 324

原创 HPU 4883 TIANKENG’s restaurant

TIANKENG’s restaurant Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 131072/65536 K (Java/Others) Total Submission(s): 2581 Accepted Submission(s): 963Problem Description TIANKENG manage

2016-07-23 15:18:17 283

原创 HDU 1789 Doing Homework again

Doing Homework again Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 11349 Accepted Submission(s): 6670Problem Description Ignatius has ju

2016-07-23 15:01:38 242

原创 HDU 2037 今年暑假不AC

今年暑假不AC Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 47012 Accepted Submission(s): 25223Problem Description “今年暑假不AC?” “是的。” “那你干什么呢?

2016-07-22 09:59:35 248

原创 codeforces - 597A

A. Divisibility time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output Find the number of k-divisible numbers on the segment [a, b]. In other word

2016-07-22 09:33:50 279

原创 HDU 1272 小希的迷宫

小希的迷宫 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 42649 Accepted Submission(s): 13141Problem Description 上次Gardon的迷宫城堡小希玩了很久(见Problem

2016-07-21 08:32:45 235

原创 HDU 1997 汉诺塔VII

杭电 1997汉诺塔VIITime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 1531 Accepted Submission(s): 1005Problem Description n个盘子的汉诺塔问题的最少移动次数是2^n-1,即

2016-07-20 20:24:10 303

空空如也

空空如也

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

TA关注的人

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