自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 E - Two Bags of Potatoes

E - Two Bags of PotatoesValera had two bags of potatoes, the first of these bags contains x (x ≥ 1) potatoes, and the second — y (y ≥ 1) potatoes. Valera — very scattered boy, so the first bag of pot...

2019-08-21 16:56:56 254

原创 A - Learning Languages

A - Learning Languages在 “BerCorp” 公司,有 n 名雇员。这些雇员可以使用 m 种核准的正式语言,用于正式的通信。这些语言以整数编号,介于 1 到 m 之间。对于每名雇员,我们已知他所懂语言的列表。这个列表可能是空的,即一名雇员可能不懂任何正式语言。但雇员们愿意学习一种或多种正式语言,只要公司为他们的课程而付费。对于每名雇员而言,学一门语言的课程费用是 1 BER...

2019-08-20 16:58:25 463

原创 B - Opposites Attract

B - Opposites AttractEverybody knows that opposites attract. That is the key principle of the “Perfect Matching” dating agency. The “Perfect Matching” matchmakers have classified each registered cust...

2019-08-19 10:40:32 380

原创 A - 最短路

A - 最短路在每年的校赛里,所有进入决赛的同学都会获得一件很漂亮的t-shirt。但是每当我们的工作人员把上百件的衣服从商店运回到赛场的时候,却是非常累的!所以现在他们想要寻找最短的从商店到赛场的路线,你可以帮助他们吗?Input输入包括多组数据。每组数据第一行是两个整数N、M(N<=100,M<=10000),N表示成都的大街上有几个路口,标号为1的路口是商店所在地,标号为N...

2019-08-18 10:41:16 151

原创 Frogger

Frogger湖中有n块石头,编号从1到n,有两只青蛙,Bob在1号石头上,Alice在2号石头上,Bob想去看望Alice,但由于水很脏,他想避免游泳,于是跳着去找她。但是Alice的石头超出了他的跳跃范围。因此,Bob使用其他石头作为中间站,通过一系列的小跳跃到达她。两块石头之间的青蛙距离被定义为两块石头之间所有可能路径上的最小必要跳跃距离,某条路径的必要跳跃距离即这条路径中单次跳跃的最远跳...

2019-08-17 16:28:14 303

原创 畅通工程再续

畅通工程再续相信大家都听说一个“百岛湖”的地方吧,百岛湖的居民生活在不同的小岛中,当他们想去其他的小岛时都要通过划小船来实现。现在政府决定大力发展百岛湖,发展首先要解决的问题当然是交通问题,政府决定实现百岛湖的全畅通!经过考察小组RPRush对百岛湖的情况充分了解后,决定在符合条件的小岛间建上桥,所谓符合条件,就是2个小岛之间的距离不能小于10米,也不能大于1000米。当然,为了节省资金,只要求...

2019-08-15 17:49:47 105

原创 Bayan Bus

Bayan BusThe final round of Bayan Programming Contest will be held in Tehran, and the participants will be carried around with a yellow bus. The bus has 34 passenger seats: 4 seats in the last row an...

2019-08-14 21:37:43 163

原创 constructing roads

C - Constructing RoadsThere are N villages, which are numbered from 1 to N, and you should build some roads such that every two villages can connect to each other. We say two village A and B are conn...

2019-08-13 22:06:13 222

原创 畅通工程

畅通工程某省调查城镇交通状况,得到现有城镇道路统计表,表中列出了每条道路直接连通的城镇。省政府“畅通工程”的目标是使全省任何两个城镇间都可以实现交通(但不一定有直接的道路相连,只要互相间接通过道路可达即可)。问最少还需要建设多少条道路?Input测试输入包含若干测试用例。每个测试用例的第1行给出两个正整数,分别是城镇数目N ( < 1000 )和道路数目M;随后的M行对应M条道路,每行...

2019-08-12 18:20:21 327

原创 New Year Book Reading

New Year Book ReadingNew Year is coming, and Jaehyun decided to read many books during 2015, unlike this year. He has n books numbered by integers from 1 to n. The weight of the i-th (1 ≤ i ≤ n) book...

2019-08-11 18:28:47 116

原创 深搜

深搜有一个长方形的房间,覆盖了正方形的磁砖。每块磁砖的颜色,要么是红色,要么是黑色。一名男子站在一块黑色的磁砖上。他可以从一块磁砖移至相邻四块磁砖中的某一块。但是,他不允许在红色磁砖上移动,他只允许在黑色磁砖上移动。编写一个程序,使得他允许重复上述的移动,判断他所能到达的黑色磁砖的数量。输入输入由多个数据集组成。数据集的起始行包含了两个正整数 W 和 H;W 和 H 分别是 x- 和 y-...

2019-08-10 18:19:59 126

原创 Fence

FenceThere is a fence in front of Polycarpus’s home. The fence consists of n planks of the same width which go one after another from left to right. The height of the i-th plank is hi meters, distinc...

2019-08-09 18:26:28 661

原创 A - Life Without Zeros

A - Life Without ZerosCan you imagine our life if we removed all zeros from it? For sure we will have many problems.In this problem we will have a simple example if we removed all zeros from our lif...

2019-08-08 20:59:38 269

空空如也

空空如也

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

TA关注的人

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