自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

fanesemyk的博客

当断不断,反受其乱!

  • 博客(11)
  • 收藏
  • 关注

原创 codeforces 361B 思维题

B. Levko and Permutationtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputLevko loves permutations very much. A permuta

2016-04-29 17:32:34 507

原创 poj2377 最大生成树 Kruskal

DescriptionBessie has been hired to build a cheap internet network among Farmer John's N (2 <= N <= 1,000) barns that are conveniently numbered 1..N. FJ has already done some surveying, and found M

2016-04-21 19:14:05 369

原创 poj 1062 昂贵的婚礼 djkstra

Description年轻的探险家来到了一个印第安部落里。在那里他和酋长的女儿相爱了,于是便向酋长去求亲。酋长要他用10000个金币作为聘礼才答应把女儿嫁给他。探险家拿不出这么多金币,便请求酋长降低要求。酋长说:"嗯,如果你能够替我弄到大祭司的皮袄,我可以只要8000金币。如果你能够弄来他的水晶球,那么只要5000金币就行了。"探险家就跑到大祭司那里,向他要求皮袄或水晶球,大祭司要他用金币来换

2016-04-19 19:36:37 356

原创 hdu4548 欧拉筛法 离线处理线性优化

Description  小明对数的研究比较热爱,一谈到数,脑子里就涌现出好多数的问题,今天,小明想考考你对素数的认识。   问题是这样的:一个十进制数,如果是素数,而且它的各位数字和也是素数,则称之为“美素数”,如29,本身是素数,而且2+9 = 11也是素数,所以它是美素数。   给定一个区间,你能计算出这个区间内有多少个美素数吗?   Input第

2016-04-15 18:50:03 487 1

原创 poj2485 最小生成树 kruskal算法

首先是模板并查集模板:int pre[1000 ];int find(int x)                                                                                                         //查找根节点{     int r=x;    while ( p

2016-04-12 21:39:39 565

原创 用vector进行图的邻接表存储

#include#include#includeusing namespace std;struct Edge{int to;int cost;};vector G[10000];//G[i]代表从i出发的边,vector里存的是边int m,n;int temp1;int main(void){ scanf("%d%d",&n,&m);//结点数,边数,从1开始

2016-04-11 21:13:27 3433

原创 poj 2387 Til the Cows Come Home dijkstra

C - Til the Cows Come HomeCrawling in process...Crawling failedTime Limit:1000MS    Memory Limit:65536KB     64bit IO Format:%I64d & %I64uSubmitStatus DescriptionBessie is ou

2016-04-08 18:37:49 318

原创 poj 1125Stockbroker Grapevine

Stockbrokers are known to overreact to rumours. You have been contracted to develop a method of spreading disinformation amongst the stockbrokers to give your employer the tactical edge in the stock m

2016-04-06 11:34:50 281

原创 hdu 1874畅通工程续 Floyd算法

Problem Description某省自从实行了很多年的畅通工程计划后,终于修建了很多路。不过路多了也不好,每次要从一个城镇到另一个城镇时,都有许多种道路方案可以选择,而某些方案要比另一些方案行走的距离要短很多。这让行人很困扰。现在,已知起点和终点,请你计算出要从起点到终点,最短需要行走多少距离。 Input本题目包含多组数据,请处理到文件结束。每组数据第一行包

2016-04-02 22:23:36 307

原创 深搜+回溯 poj3009 Curling 2.0

On Planet MM-21, after their Olympic games this year, curling is getting popular. But the rules are somewhat different from ours. The game is played on an ice game board on which a square mesh is mark

2016-04-01 10:32:13 300

原创 拓扑排序 CodeForces - 510C Fox And Names

题目DescriptionFox Ciel is going to publish a paper on FOCS (Foxes Operated Computer Systems, pronounce: "Fox"). She heard a rumor: the authors list on the paper is always sorted in thelexic

2016-04-01 10:05:15 430

空空如也

空空如也

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

TA关注的人

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