自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 UVA796-Critical Links

题意:给出n个点,m条无向边,按顺序输出桥#include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std;#define LL long long

2017-03-31 22:02:33 386

原创 UVA315-Network

题意:给出一张无向图,求割点个数#include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std;#define LL long longcons

2017-03-31 21:13:33 476

原创 POJ1236-Network of Schools

Network of SchoolsTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 17549 Accepted: 6943DescriptionA number of schools are connected to a computer netwo

2017-03-31 20:59:05 253

原创 HDU4612-Warm up(无向图强连通分量缩点)

Warm up                                                                           Time Limit: 10000/5000 MS (Java/Others)    Memory Limit: 65535/65535 K (Java/Others)

2017-03-31 19:13:04 1877 1

原创 POJ2762-Going from u to v or from v to u?(有向图强连通分量缩点)

Going from u to v or from v to u?Time Limit: 2000MS Memory Limit: 65536KTotal Submissions: 17556 Accepted: 4714DescriptionIn order to make their sons brave, Jia

2017-03-31 18:51:04 310

原创 POJ3177-Redundant Paths

Redundant PathsTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 14268 Accepted: 6065DescriptionIn order to get from one of the F (1 <= F <= 5,000) graz

2017-03-30 23:10:43 396

原创 求边连通度

#include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std;#define LL long longconst int INF=0x3f3f3f3f;

2017-03-30 23:05:58 754

原创 NBUT1222-English Game

English Game时间限制: 1000 ms 内存限制: 131072 K问题描述This English game is a simple English words connection game.The rules are as follows: there are N English words in a dictionary, a

2017-03-29 19:24:18 580

原创 NBUT1225-NEW RDSP MODE I

NEW RDSP MODE I时间限制: 1000 ms 内存限制: 131072 K问题描述Little A has became fascinated with the game Dota recently, but he is not a good player. In all the modes, the rdsp Mode is pop

2017-03-28 23:42:30 401

原创 NBUT1223-Friends number

Friends number时间限制: 1000 ms 内存限制: 131072 K问题描述Paula and Tai are couple. There are many stories between them. The day Paula left by airplane, Tai send one message to telephone 2200284,

2017-03-28 23:36:42 336

原创 NBUT1219-Time

Time时间限制: 1000 ms 内存限制: 131072 K问题描述Digital clock use 4 digits to express time, each digit is described by 3*3 characters (including”|”,”_”and” “).now given the current time, please tell

2017-03-28 23:27:20 371

原创 NBUT1218-You are my brother

You are my brother时间限制: 1000 ms 内存限制: 131072 K问题描述Little A gets to know a new friend, Little B, recently. One day, they realize that they are family 500 years ago. Now, Little A wants to

2017-03-28 23:15:17 468

原创 NBUT1217-Dinner

Dinner时间限制: 1000 ms 内存限制: 32768 K问题描述Little A is one member of ACM team. He had just won the gold in World Final. To celebrate, he decided to invite all to have one meal. As bowl, knife an

2017-03-28 23:11:37 220

原创 2017广东工业大学程序设计竞赛决赛-占点游戏

占点游戏Description众所周知的是,TMK特别容易迟到,终于在TMK某次又迟到了之后,Maple怒了,Maple大喊一声:“我要跟你决一死战!”然后Maple就跟TMK玩起了一个关于占点的游戏。Maple在一个无限展开的只有整数点的二维平面上找到两个点,由TMK和Maple分别操控这两个点,两人轮流操作,每一次操作

2017-03-28 23:01:32 467

原创 2017广东工业大学程序设计竞赛决赛-倒水(Water)(二进制的奇妙运用)

倒水(Water)Description一天,CC买了N个容量可以认为是无限大的瓶子,开始时每个瓶子里有1升水。接着~~CC发现瓶子实在太多了,于是他决定保留不超过K个瓶子。每次他选择两个当前含水量相同的瓶子,把一个瓶子的水全部倒进另一个里,然后把空瓶丢弃。(不能丢弃有水的瓶子)显然在某些情况下CC无法达到目标,比如N=3,K=1。此时CC会重新买一些新的瓶

2017-03-28 22:58:27 620

原创 2017广东工业大学程序设计竞赛决赛-等凹数字

等凹数字Description定义一种数字称为等凹数字,即从高位到地位,每一位的数字先非递增再非递减,不能全部数字一样,且该数是一个回文数,即从左读到右与从右读到左是一样的,仅形成一个等凹峰,如543212345,5544334455是合法的等凹数字,543212346,123321,111111不是等凹数字。现在问你[L,R]中有多少等凹数字呢?Inp

2017-03-28 22:52:49 557

原创 2017广东工业大学程序设计竞赛决赛-tmk找三角

tmk找三角Description有一棵树,树上有只tmk。他在这棵树上生活了很久,对他的构造了如指掌。所以他在树上从来都是走最短路,不会绕路。他还还特别喜欢三角形,所以当他在树上爬来爬去的时候总会在想,如果把刚才爬过的那几根树枝/树干锯下来,能不能从中选三根出来拼成一个三角形呢?Input第一行输入一个T,表示有多少组样例。

2017-03-28 22:49:15 653

原创 2017广东工业大学程序设计竞赛决赛-tmk买礼物

tmk买礼物Description今天是校赛的日子,为了庆祝这么喜庆的日子,TMK打算买些礼物给女票LSH庆祝一下。TMK进入了雪梨超市,然后刚踏入的一瞬间,店主就对TMK说:“恭喜你成为了本店第2147483647位顾客,本店在搞一个活动,对本店第2147483647位顾客进行赠送活动。你先看看你有多少钱?”TMK一摸口袋,发现只有n个硬币,每个硬

2017-03-28 22:43:17 245

原创 2017广东工业大学程序设计竞赛决赛-只有通过毁灭才能揭示真理

只有通过毁灭才能揭示真理Description“只有通过毁灭才能揭示真理。” —— 虚空之眼维克兹是一个有触手的虚空来客,他带着非凡的意图探索着符文之地:吸收掉所有知识。凭借着他不断地注视,维克兹可以发射瓦解光线来灭除并分析他途中的一切东西,并为他供给数量庞大的信息。没人知道他为什么需要如此多的材料,尽管有人推测他设法了解符文之地,是为了加速它的毁灭。

2017-03-28 22:41:45 410

原创 2017广东工业大学程序设计竞赛决赛-爬楼梯

爬楼梯Description小时候,我只能一阶一阶得爬楼梯,后来,我除了能一次爬一阶,还可以一次爬两阶,到现在,我最多一次可以爬三阶。那么现在问题来了,我想爬上n层楼,相邻楼层之间有一段楼梯,虽然我一次可以爬1个台阶、2个台阶和3个台阶,但是我在i与i+1层之间的楼梯上时,我不能跨越到i+1与i+2层之间的楼梯。现在有个n层的楼,知道每一段楼

2017-03-28 12:58:38 641

原创 2017广东工业大学程序设计竞赛决赛-两只老虎

两只老虎Description来,我们先来放松下,听听儿歌,一起“唱”。两只老虎两只老虎,跑得快跑得快。一只没有耳朵,一只没有尾巴。真奇怪,真奇怪。Tmk也觉得很奇怪,因为在他面前突然出现了一群这样的老虎,有的没耳朵,有的没尾巴,不过也有正常的。现在Tmk告诉你这群老虎的耳朵个数,尾巴条数,以及老虎的腿的数目,问你有多少只是正

2017-03-28 12:38:11 450

原创 ZSTU4272-最佳淘汰算法

4272: 最佳淘汰算法Time Limit: 12 Sec  Memory Limit: 128 MBSubmit: 408  Solved: 61DescriptionLyf在做操作系统作业的时候,遇到了一题要他实现下Opt算法(全称页面置换最佳淘汰算法)。可是Lyf发现最近好忙啊,于是他想请他的学弟,学妹们帮他来完成。作业里的内容是这样的:提出最佳页面淘汰算法

2017-03-26 20:23:37 859

原创 zstu-4273玩具

4273: 玩具Time Limit: 1 Sec  Memory Limit: 128 MBSubmit: 861  Solved: 181Description商店有n个玩具,第i个玩具有价格a[i]和快乐值b[i]。有一天,小王来到商店想买一些玩具,商店老板告诉他,如果他买的所有玩具的位置是连续的,那么老板答应小王购买的所有玩具中某一个可以免费。小王接受老板的提议

2017-03-26 20:21:19 515

原创 zstu4274-约素

4274: 约素Time Limit: 1 Sec  Memory Limit: 128 MBSubmit: 1897  Solved: 496Description判断一个正整数n的约数个数是否为p,其中p是素数。Input第一行给测试总数T(T 接下来有T行,每行有两个数字n(1 Output每组测试数据输出一行,如果n的约数个数

2017-03-26 20:19:20 473

原创 zstu-4270同源数

4270: 同源数Time Limit: 3 Sec  Memory Limit: 128 MBSubmit: 1377  Solved: 261Description如果x和y的质因子集合完全相同,那么我们就说他们是同源的。比如说18 = 2 * 32,12 = 3 * 22;Input本题有多组数据(组数 每组数据输入形如:x y

2017-03-26 20:15:18 329

原创 zstu-4269买iphone

4269: 买iphoneTime Limit: 3 Sec  Memory Limit: 128 MBSubmit: 1913  Solved: 365Description自从上次仓鼠中了1000万彩票后,彻底变成了土豪了,一群人愿意认他做干爹,仓鼠决定送他的干儿子每人一部iphone。仓鼠今天带了一群人去买iphone,每个人身上都背着一个大背包,只有3种背包,分

2017-03-26 20:12:31 251

原创 zstu4266-回文

4266: 回文Time Limit: 1 Sec  Memory Limit: 128 MBSubmit: 1788  Solved: 544Description小王想知道一个字符串是否为ABA’型字符串。ABA’型字符串的定义:S=ABA’,A,B,A’都是原字符串的子串(不能是空串),A’的意思是A的反转串,B不一定要和A或A’不同。符合ABA’型的例如:"ab

2017-03-26 20:10:53 271

原创 ZOJ2182&&POJ1966-Cable TV Network(求顶点连通度)

Cable TV NetworkTime Limit: 2 Seconds      Memory Limit: 65536 KBThe interconnection of the relays in a cable TV network is bi-directional. The network is connected if there is at least one

2017-03-25 23:43:46 416

原创 HDU4009-Transfer water

Transfer water                                                                                  Time Limit: 5000/3000 MS (Java/Others)    Memory Limit: 65768/65768 K (Java/Others)               

2017-03-24 22:32:44 262

原创 HDU2121-Ice_cream’s world II(最小树形图)

Ice_cream’s world II                                                                                Time Limit: 3000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)

2017-03-24 22:24:03 258

原创 UVA11183-Teen Girl Squad

题意:有n个点,m条有向边,问能不能从0号点做到所有点,并求出最小权值解题思路:最小树形图#include #include #include #include #include #include #include #include #include #include #include #include using namespace std;#def

2017-03-24 22:08:16 539

原创 输出各个重连通分量的边

输出各个重联通分量的边#include #include #include #include #include #include #include #include #include #include #include #include using namespace std;#define LL long longconst int INF=0x3f3f3f3

2017-03-24 21:36:32 257

原创 ZOJ2588-Burning Bridges

Burning BridgesTime Limit: 5 Seconds      Memory Limit: 32768 KBFerry Kingdom is a nice little country located on N islands that are connected by M bridges. All bridges are very beautiful an

2017-03-24 21:21:15 317

原创 ZOJ1119&&POJ1523-SPF(求割点)

SPFTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 8584 Accepted: 3916DescriptionConsider the two networks shown below. Assuming that data moves aroun

2017-03-24 21:15:37 433

原创 POJ3164-Command Network

Command NetworkTime Limit: 1000MS Memory Limit: 131072KTotal Submissions: 17829 Accepted: 5111DescriptionAfter a long lasting war on words, a war on arms fina

2017-03-24 20:09:57 296

原创 UVA10462-Is There A Second Way Left?

题意:有n个点,m条边,求最小生成树#include #include #include #include #include #include #include #include #include #include #include #include using namespace std;#define LL long longconst int IN

2017-03-24 20:05:57 319

原创 UVA10600-ACM Contest and Blackout

题意:给出n个点,m条边,计算最小生成树和次小生成树#include #include #include #include #include #include #include #include #include #include #include #include using namespace std;#define LL long longcons

2017-03-24 20:00:10 224

原创 HDU4081-Qin Shi Huang's National Road System(次小生成树)

Qin Shi Huang's National Road System                                                                    Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)

2017-03-24 19:57:02 364

原创 POJ1679-The Unique MST

The Unique MSTTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 29566 Accepted: 10583DescriptionGiven a connected undirected graph, tell if its minimum

2017-03-24 19:39:19 273

原创 团体程序设计天梯赛L3-008 喊山

L3-008. 喊山时间限制150 ms内存限制65536 kB代码长度限制8000 B判题程序Standard作者陈越喊山,是人双手围在嘴边成喇叭状,对着远方高山发出“喂—喂喂—喂喂喂……”的呼唤。呼唤声通过空气的传递,回荡于深谷之间,传送到人们耳中

2017-03-21 16:28:23 378

空空如也

空空如也

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

TA关注的人

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