自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

olahiuj的博客

~!@#$%^&*(

  • 博客(27)
  • 资源 (1)
  • 收藏
  • 关注

原创 2002年分区联赛普级组之二_选数_ssl1020_dfs

Description  已知 n 个整数 x1,x2,…,xn,以及一个整数 k(k<n)。从 n 个整数中任选 k 个整数相加,可分别得到一系列的和。例如当 n=4,k=3,4 个整数分别为 3,7,12,19 时,可得全部的组合与它们的和为:  3+7+12=223+7+19=297+12+19=383+12+19=34现在,要求你计算出和为素数共有多少种。 例如上例,只有一种的

2016-06-29 21:22:45 492

原创 Electricity_toj2299_割点

DescriptionBlackouts and Dark Nights (also known as ACM++) is a company that provides electricity. The company owns several power plants, each of them supplying a small area that surrounds it. This org

2016-06-28 20:48:32 511

原创 The Key Sations_toj2189_割点

DescriptionIn the city named ACM, there aren’t any network stations by now, what’s a pity! So the government plans to establish a complete network, and decides to set up a team in charge of this projec

2016-06-28 17:09:11 464

原创 Network_toj1026_割点

DescriptionA Telephone Line Company (TLC) is establishing a new telephone cable network. They are connecting several places numbered by integers from 1 to N. No two places have the same number. The lin

2016-06-28 16:48:07 526

转载 苹果_ssl1637_dp

Description  农场的夏季是收获的好季节。在Farmer John的农场,他们用一种特别的方式来收苹果:Bessie摇苹果树,苹果落下,然后Farmer John尽力接到尽可能多的苹果。   作为一个有经验的农夫, Farmer John将这个过程坐标化。他清楚地知道什么时候(1<=t<=1,000,000)什么位置(用二维坐标表示,-1000<=x,y<=1000)会有苹果落下。他只

2016-06-26 21:27:32 689

原创 Network_poj1144_割点

DescriptionA Telephone Line Company (TLC) is establishing a new telephone cable network. They are connecting several places numbered by integers from 1 to N . No two places have the same number. The li

2016-06-25 10:30:37 423

原创 备用交换机_cogs8_割点

【问题描述】n个城市之间有通讯网络,每个城市都有通讯交换机,直接或间接与其它城市连接。因电子设备容易损坏,需给通讯点配备备用交换机。但备用交换机数量有限,不能全部配备,只能给部分重要城市配置。于是规定:如果某个城市由于交换机损坏,不仅本城市通讯中断,还造成其它城市通讯中断,则配备备用交换机。请你根据城市线路情况,计算需配备备用交换机的城市个数,及需配备备用交换机城市的编号。【输入格式】输入文件有若干

2016-06-24 21:29:54 338

原创 Chessboard_poj2446_匹配

DescriptionAlice and Bob often play games on chessboard. One day, Alice draws a board with size M * N. She wants Bob to use a lot of cards with size 1 * 2 to cover the board. However, she thinks

2016-06-21 16:15:25 535

原创 最小路径覆盖_zoj1525_最小路径覆盖+水

Description  定义: 一个不含圈的有向图G中,G的一个路径覆盖是一个其结点不相交的路径集合P,图中的每一个结点仅包含于P中的某一条路径。路径可以从任意结点开始和结束,且长度也为任意值,包括0。请你求任意一个不含圈的有向图G的最小路径覆盖数。 提示:最小路径覆盖数=G的定点数-最小路径覆盖中的边数最小路径覆盖数=原图G的顶点数-二分图的最大匹配数

2016-06-19 12:30:37 412

原创 拦截导弹_codevs1044_最小路径覆盖+DP+水

题目描述Description    某国为了防御敌国的导弹袭击,发展出一种导弹拦截系统。但是这种导弹拦截系统有一个缺陷:虽然它的第一发炮弹能够到达任意的高度,但是以后每一发炮弹都不能高于前一发的高度。某天,雷达捕捉到敌国的导弹来袭。由于该系统还在试用阶段,所以只有一套系统,因此有可能不能拦截所有的导弹。输入描述Input Description输入导弹依次飞来的高度(

2016-06-19 12:16:13 592

原创 Asteroids_poj3041_匹配

DescriptionBessie wants to navigate her spaceship through a dangerous asteroid field in the shape of an N x N grid (1 Fortunately, Bessie has a powerful weapon that can vaporize all the asteroid

2016-06-18 13:38:28 430

原创 CoVH之柯南开锁_vijos 1204_匹配

背景Background随着时代的演进,困难的刑案也不断增加...但真相只有一个虽然变小了,头脑还是一样好,这就是名侦探柯南!      描述Description面对OIBH组织的嚣张气焰,柯南决定深入牛棚,一探虚实.他经过深思熟虑,决定从OIBH组织大门进入........... OIBH组织的大门有一个很神奇的锁.锁是由M*N个

2016-06-18 13:24:23 718

原创 地鼠的困境_ssl1333_匹配

Description  地鼠家族面临着一个新的威胁——猎食者。  地鼠家族一共有N个地鼠和M个鼠洞,每个都位于不同的(x, y)坐标中。假如有地鼠在发觉危险以后s秒内都没有回到鼠洞里的话,就可能成为老鹰的食物。当然了,一个鼠洞只能拯救一只地鼠的命运,所有地鼠都以相等的速度v移动。地鼠家族需要设计一种策略,使得老鹰来时,易受攻击的地鼠数量最少。Input

2016-06-17 20:35:16 518

转载 信与信封问题_codevs1222_匹配

题目描述 DescriptionJohn先生晚上写了n封信,并相应地写了n个信封将信装好,准备寄出。但是,第二天John的儿子Small John将这n封信都拿出了信封。不幸的是,Small John无法将拿出的信正确地装回信封中了。将Small John所提供的n封信依次编号为1,2,…,n;且n个信封也依次编号为1,2,…,n。假定Small John能提供一组信息:第i封信肯定不是装

2016-06-16 21:26:41 1436

原创 人员分配问题_SSL1338_匹配

Description  设有M个工人x1, x2, …, xm,和N项工作y1, y2, …, yn,规定每个工人至多做一项工作,而每项工作至多分配一名工人去做。由于种种原因,每个工人只能胜任其中的一项或几项工作。问应怎样分配才能使尽可能多的工人分配到他胜任的工作。这个问题称为人员分配问题。 Input第一行两个整数m,n分别为工人数和工作数。 接下来一个整数s,为二分图的边数。

2016-06-16 17:09:25 583

原创 Wedding_poj3648_2-sat

DescriptionUp to thirty couples will attend a wedding feast, at which they will be seated on either side of a long table. The bride and groom sit at one end, opposite each other, and the bride wears

2016-06-14 18:01:34 623

原创 Get Luffy_poj2723_2-sat+二分

DescriptionRatish is a young man who always dreams of being a hero. One day his friend Luffy was caught by Pirate Arlong. Ratish set off at once to Arlong's island. When he got there, he found the s

2016-06-11 21:27:38 415

转载 Building Roads_poj2749_2-sat+二分

DescriptionFarmer John's farm has N barns, and there are some cows that live in each barn. The cows like to drop around, so John wants to build some roads to connect these barns. If he builds

2016-06-10 19:59:29 443

原创 Peaceful Commission_hdu1814_2-sat

Problem DescriptionThe Public Peace Commission should be legislated in Parliament of The Democratic Republic of Byteland according to The Very Important Law. Unfortunately one of the obstacles

2016-06-10 10:50:09 528

原创 Ikki's Story IV - Panda's Trick_poj3207_2-sat

Descriptionliympanda, one of Ikki’s friend, likes playing games with Ikki. Today after minesweeping with Ikki and winning so many times, he is tired of such easy games and wants to play another

2016-06-09 11:32:03 560

转载 Katu Puzzle_poj3678_2-sat

DescriptionKatu Puzzle is presented as a directed graph G(V, E) with each edge e(a, b) labeled by a boolean operator op (one of AND, OR, XOR) and an integer c (0 ≤ c ≤ 1).(什么鬼名字O__O "…) One Ka

2016-06-09 00:04:45 491

原创 N皇后_codevs1295_dfs+位运算_水

题目描述Description在n×n格的棋盘上放置彼此不受攻击的n个皇后。按照国际象棋的规则,皇后可以攻击与之处在同一行或同一列或同一斜线上的棋子。n后问题等价于再n×n的棋盘上放置n个皇后,任何2个皇后不妨在同一行或同一列或同一斜线上。输入描述Input Description 给定棋盘的大小n (n≤ 13)输出描述Output Description

2016-06-07 10:21:32 364

原创 Popular Cows_POJ2186_Tarjan

DescriptionA number of schools are connected to a computer network. Agreements have been developed among those schools: each school maintains a list of schools to which it distributes software (the

2016-06-04 11:59:06 387

原创 Network of Schools_POJ1236_Tarjan

DescriptionA number of schools are connected to a computer network. Agreements have been developed among those schools: each school maintains a list of schools to which it distributes software (the

2016-06-04 11:42:47 418

原创 打鼹鼠_SSL1506_DP_水

Description鼹鼠是一种很喜欢挖洞的动物,但每过一定的时间,它还是喜欢把头探出到地面上来透透气的。  根据这个特点阿Q编写了一个打鼹鼠的游戏:在一个n*n的网格中,在某些时刻鼹鼠会在某一个网格探出头来透透气。你可以控制一个机器人来打鼹鼠,如果i时刻鼹鼠在某个网格中出现,而机器人也处于同一网格的话,那么这个鼹鼠就会被机器人打死。而机器人每一时刻只能够移动一格或停留在原地不动。机器

2016-06-03 20:09:30 549

原创 乌龟棋_CODEVS1068_DP

题目描述 Description小明过生日的时候,爸爸送给他一副乌龟棋当作礼物。乌龟棋的棋盘是一行N个格子,每个格子上一个分数(非负整数)。棋盘第1格是唯一的起点,第N格是终点,游戏要求玩家控制一个乌龟棋子从起点出发走到终点。…… 1 2 3 4 5 ……N 乌龟棋中M张爬行卡片,分成4种不同的类型(M张卡片中不一定包含所有4种类型的卡片,见样例),每种类型的卡片上分别标有1、2、3、

2016-06-01 21:23:03 372

转载 丢失的牛?_Lost Cows_POJ2182_线段树

DescriptionN (2 <= N <= 8,000) cows have unique brands in the range 1..N. In a spectacular display of poor judgment, they visited the neighborhood 'watering hole' and drank a few too many beers befo

2016-06-01 20:55:18 459

aiml-Alice-enUS

aiml的alice英语库

2017-02-01

空空如也

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

TA关注的人

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