自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 hdu 3342 Legal or Not(拓扑排序)

  Problem Description ACM-DIY is a large QQ group where many excellent acmers get together. It is so harmonious that just like a big family. Every day,many "holy cows" like HH, hh, AC, ZT, lcc,...

2019-01-28 19:14:38 128

原创 hdu 1285 确定比赛名次(拓扑排序)

Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 39306    Accepted Submission(s): 15186   Problem Description 有N个比赛队(1<=N<=50...

2019-01-28 18:45:52 150

原创 ACM-ICPC北京赛区2018现场赛I

Palindromes时间限制:1000ms单点时限:1000ms内存限制:512MB描述Recently, Nvoenewr learnt palindromes in his class.A palindrome is a nonnegative integer that is the same when read from left to right and when...

2018-11-15 03:56:21 402

原创 ACM-ICPC北京赛区2018现场赛 A题

Jin Yong’s Wukong Ranking List时间限制:1000ms单点时限:1000ms内存限制:512MB描述Jin Yong was the most famous and popular Chinese wuxia (The one who fight bad people by his Wukong i.e. Wushu and Kongfu) nove...

2018-11-15 03:45:43 241

原创 2014ACM/ICPC亚洲区北京站-D - Dire Wolf

HDU - 5115Dire wolves, also known as Dark wolves, are extraordinarily large and powerful wolves. Many, if not all, Dire Wolves appear to originate from Draenor. Dire wolves look like normal wolves,...

2018-09-22 19:18:47 231

原创 2014ACM/ICPC亚洲区北京站-I - Intersection

Matt is a big fan of logo design. Recently he falls in love with logo made up by rings. The following figures are some famous examples you may know. A ring is a 2-D figure bounded by two circles ...

2018-09-22 19:15:16 327

原创 2014ACM/ICPC亚洲区北京站-K Bro Sorting

HDU - 5122Matt’s friend K.Bro is an ACMer. Yesterday, K.Bro learnt an algorithm: Bubble sort. Bubble sort will compare each pair of adjacent items and swap them if they are in the wrong order. The ...

2018-09-22 18:02:03 209

原创 2014ACM/ICPC亚洲区北京站-B - Black And White

HDU - 5113In mathematics, the four color theorem, or the four color map theorem, states that, given any separation of a plane into contiguous regions, producing a figure called a map, no more than f...

2018-09-22 17:53:56 172

原创 2014ACM/ICPC亚洲区北京站-H - Happy Matt Friends

HDU - 5119Matt has N friends. They are playing a game together. Each of Matt’s friends has a magic number. In the game, Matt selects some (could be zero) of his friends. If the xor (exclusive-or) s...

2018-09-22 17:22:56 241

原创 2014ACM/ICPC亚洲区北京站-A Curious Matt

HDU - 5112There is a curious man called Matt. One day, Matt's best friend Ted is wandering on the non-negative half of the number line. Matt finds it interesting to know the maximal speed Ted may r...

2018-09-22 17:12:51 187

原创 NYOJ133子序列(坐标离散化)

描述给定一个序列,请你求出该序列的一个连续的子序列,使原串中出现的所有元素皆在该子序列中出现过至少1次。如2 8 8 8 1 1,所求子串就是2 8 8 8 1。输入第一行输入一个整数T(0<T<=5)表示测试数据的组数每组测试数据的第一行是一个整数N(1<=N<=1000000),表示给定序列的长度。随后的一行有N个正整数,表示给定的序列中的所有元素。...

2018-09-18 16:28:28 118

原创 区域的个数(坐标离散化)

在w*h的格子上画了n条垂直或者水平的宽度为1的直线。求出这些直线将格子划分为了多少个区域? 限制条件: 1<= w,h <= 1000000 1<= n <= 500 输入:首先输入w,h,n;然后输入对应的x1,x2,y1,y2.输出区域的个数。 输入: 10 10 5 x1:1 1 4 9 10 x2:6 10 4 9 10 y1:4 8 1 1 6...

2018-09-18 16:13:30 348 1

原创 超大背包问题(折半枚举)

有重量和价值分别为wi,vi的n个物品,从这些物品中挑选总重量不超过W的物品,求所有挑选方案中价值总和的最大值。1<n<401<wi,vi<10^151<W<10^15#include <bits/stdc++.h>using namespace std;typedef long long ll;#define INF 100...

2018-09-18 15:54:42 182

原创 POJ 2758 4 Values whose Sum is 0(折半枚举)

POJ - 2785 The SUM problem can be formulated as follows: given four lists A, B, C, D of integer values, compute how many quadruplet (a, b, c, d ) ∈ A x B x C x D are such that a + b + c + d = 0 . In...

2018-09-18 14:57:09 105

原创 [kuangbin带你飞]专题四 最短路练习 G - MPI Maelstrom

POJ - 1502BIT 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 r...

2018-08-03 14:58:30 152

原创 [kuangbin带你飞]专题四 最短路练习 F - Wormholes

POJ - 3259While 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...

2018-08-03 14:16:00 218

原创 [kuangbin带你飞]专题四 最短路练习 E - Currency Exchange

POJ - 1860Several 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 currencie...

2018-08-03 14:14:45 314

原创 [kuangbin带你飞]专题四 最短路练习 D - Silver Cow Party

POJ - 3268One 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...

2018-07-31 10:20:57 133

原创 [kuangbin带你飞]专题四 最短路练习 C - Heavy Transportation

POJ - 1797Background Hugo 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 p...

2018-07-30 10:55:39 187

原创 [kuangbin带你飞]专题四 最短路练习 B - Frogger

POJ - 2253Freddy 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 t...

2018-07-30 09:59:28 203

原创 [kuangbin带你飞]专题四 最短路练习 A - Til the Cows Come Home

POJ - 2387Bessie is out in the field and wants to get back to the barn to get as much sleep as possible before Farmer John wakes her for the morning milking. Bessie needs her beauty sleep, so she wa...

2018-07-30 09:42:14 154

原创 校OJ 3651 生日蛋糕(DFS剪枝)

题目描述7月17日是Mr.W的生日,ACM-THU为此要制作一个体积为Nπ的M层生日蛋糕,每层都是一个圆柱体。设从下往上数第i(1 <= i <= M)层蛋糕是半径为Ri, 高度为Hi的圆柱。当i < M时,要求Ri > Ri+1且Hi > Hi+1。由于要在蛋糕上抹奶油,为尽可能节约经费,我们希望蛋糕外表面(最下一层的下底面除外)的面积Q最小。令Q = S...

2018-07-28 16:14:47 389

原创 [kuangbin带你飞]专题一 简单搜索 N - Find a way

HDU - 2612Pass a year learning in Hangzhou, yifenfei arrival hometown Ningbo at finally. Leave Ningbo one year, yifenfei have many people to meet. Especially a good friend Merceki. Yifenfei’s home ...

2018-07-28 14:39:33 158

转载 [kuangbin带你飞]专题一 简单搜索 M - 非常可乐

HDU - 1495大家一定觉的运动以后喝可乐是一件很惬意的事情,但是seeyou却不这么认为。因为每次当seeyou买了可乐以后,阿牛就要求和seeyou一起分享这一瓶可乐,而且一定要喝的和seeyou一样多。但seeyou的手中只有两个杯子,它们的容量分别是N 毫升和M 毫升 可乐的体积为S (S<101)毫升 (正好装满一瓶) ,它们三个之间可以相互倒可乐 (都是没有刻度的,且 S...

2018-07-28 14:31:13 158

原创 [kuangbin带你飞]专题一 简单搜索 L - Oil Deposits

HDU - 1241 The GeoSurvComp geologic survey company is responsible for detecting underground oil deposits. GeoSurvComp works with one large rectangular region of land at a time, and creates a grid th...

2018-07-28 14:25:06 120

原创 [kuangbin带你飞]专题一 简单搜索 K - 迷宫问题

POJ - 3984定义一个二维数组: int maze[5][5] = { 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 0,};它表示一个迷宫,其中的1表示墙壁,0表示可以走的路,只能横着走或竖着走,不能斜着走,要求编程序找出从左上角到右下角的最短路线。...

2018-07-28 14:11:48 124

原创 [kuangbin带你飞]专题一 简单搜索 J - Fire!

UVA - 11624Joe 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 locat...

2018-07-28 13:44:08 215

原创 [kuangbin带你飞]专题一 简单搜索 I - Fire Game

FZU - 2150Fat brother and Maze are playing a kind of special (hentai) game on an N*M board (N rows, M columns). At the beginning, each grid of this board is consisting of grass or just empty and the...

2018-07-28 10:08:46 186

原创 [kuangbin带你飞]专题一 简单搜索 H - Pots

POJ - 3414You are given two pots, having the volume of A and B liters respectively. The following operations can be performed:FILL(i)        fill the pot i (1 ≤ i ≤ 2) from the tap; DROP(i)      ...

2018-07-27 18:55:24 174

原创 [kuangbin带你飞]专题一 简单搜索 G - Shuffle'm Up

POJ - 3087A common pastime for poker players at a poker table is to shuffle stacks of chips. Shuffling chips is performed by starting with two stacks of poker chips, S1 and S2, each stack containing...

2018-07-27 18:17:48 150

原创 [kuangbin带你飞]专题一 简单搜索 F - Prime Path

POJ - 3126The ministers of the cabinet were quite upset by the message from the Chief of Security stating that they would all have to change the four-digit room numbers on their offices. — It is a ...

2018-07-25 21:25:31 116

原创 [kuangbin带你飞]专题一 简单搜索 E - Find The Multiple

POJ - 1426Given a positive integer n, write a program to find out a nonzero multiple m of n whose decimal representation contains only the digits 0 and 1. You may assume that n is not greater than 2...

2018-07-25 20:49:12 149

原创 [kuangbin带你飞]专题一 简单搜索 D - Fliptile

POJ - 3279Farmer John knows that an intellectually satisfied cow is a happy cow who will give more milk. He has arranged a brainy activity for cows in which they manipulate an M × N grid (1 ≤ M ≤ 15...

2018-07-25 20:46:25 124

原创 [kuangbin带你飞]专题一 简单搜索 C - Catch That Cow

POJ - 3278Farmer John has been informed of the location of a fugitive cow and wants to catch her immediately. He starts at a point N (0 ≤ N ≤ 100,000) on a number line and the cow is at a point K (0...

2018-07-25 20:34:12 164

原创 [kuangbin带你飞]专题一 简单搜索 B - Dungeon Master

POJ - 2251You are trapped in a 3D dungeon and need to find the quickest way out! The dungeon is composed of unit cubes which may or may not be filled with rock. It takes one minute to move one unit ...

2018-07-25 20:30:30 141

原创 [kuangbin带你飞]专题一 简单搜索 A - 棋盘问题

POJ - 1321在一个给定形状的棋盘(形状可能是不规则的)上面摆放棋子,棋子没有区别。要求摆放时任意的两个棋子不能放在棋盘中的同一行或者同一列,请编程求解对于给定形状和大小的棋盘,摆放k个棋子的所有可行的摆放方案C。Input输入含有多组测试数据。 每组数据的第一行是两个正整数,n k,用一个空格隔开,表示了将在一个n*n的矩阵内描述棋盘,以及摆放棋子的数目。 n <= 8...

2018-07-25 20:27:33 177

空空如也

空空如也

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

TA关注的人

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