- 博客(175)
- 问答 (4)
- 收藏
- 关注
原创 0 or 1(最短路转化)
Description Given a n*n matrix C ij (1<=i,j<=n),We want to find a n*n matrix X ij (1<=i,j<=n),which is 0 or 1. Besides,X ij meets the following conditions: 1.X 12+X 13+…X 1n=1 2.X 1n+X 2n+…X n-1n=1
2015-10-30 19:47:13
1028
原创 The Shortest Path in Nya Graph(神一样的建图)
Description This is a very easy problem, your task is just calculate el camino mas corto en un grafico, and just solo hay que cambiar un poco el algoritmo. If you do not understand a word of this para
2015-10-30 19:34:22
629
原创 Extended Traffic(spfa判负环)
Description Dhaka city is getting crowded and noisy day by day. Certain roads always remain blocked in congestion. In order to convince people avoid shortest routes, and hence the crowded roads, to re
2015-10-30 19:09:58
540
原创 Tram(转换为最短路模型)
Description Tram network in Zagreb consists of a number of intersections and rails connecting some of them. In every intersection there is a switch pointing to the one of the rails going out of the in
2015-10-30 19:01:43
671
原创 昂贵的聘礼(坑爹的枚举+bellmanford)
Description 年轻的探险家来到了一个印第安部落里。在那里他和酋长的女儿相爱了,于是便向酋长去求亲。酋长要他用10000个金币作为聘礼才答应把女儿嫁给他。探险家拿不出这么多金币,便请求酋长降低要求。酋长说:”嗯,如果你能够替我弄到大祭司的皮袄,我可以只要8000金币。如果你能够弄来他的水晶球,那么只要5000金币就行了。”探险家就跑到大祭司那里,向他要求皮袄或水晶球,大祭司要他用金币来换,
2015-10-30 18:57:37
607
转载 Subway(最短路)
http://blog.csdn.net/catglory/article/details/49342213 这个写得比较好,图画的也不错,转载了。题目链接:[POJ 2502]Subway[最短路] 题意分析: 你从A到B上学,可以选择走路或者到地铁站搭乘地铁到达,走路速度10km/h,地铁速度40km/h,你可以任意站点下车上车,问:最快要多少分钟到达学校? 解题思路: 建图求
2015-10-30 18:53:02
494
原创 Candies(差数约分系统-最短路)
During the kindergarten days, flymouse was the monitor of his class. Occasionally the head-teacher brought the kids of flymouse’s class a large bag of candies and had flymouse distribute them. All the
2015-10-30 18:43:15
617
原创 Party at Hali-Bula(树形dp)
Dear Contestant, I’m going to have a party at my villa at Hali-Bula to celebrate my retirement from BCM. I wish I could invite all my co-workers, but imagine how an employee can enjoy a party when he
2015-10-22 00:30:11
457
原创 A Spy in the Metro(dp)
Secret agent Maria was sent to Algorithms City to carry out an especially dangerous mission. After several thrilling events we find her in the first station of Algorithms City Metro, examining the tim
2015-10-22 00:23:04
468
原创 Guess(精确2位浮点数)
A competition was just over. It had 3 problems and n players. Each player had an ID number from 1 to n. The final rank was decided by the total score of the 3 problems. The higher the total score was,
2015-10-22 00:17:35
546
原创 Solve It(二分解方程)
Solve the equation: p ∗ e^−x + q ∗ sin(x) + r ∗ cos(x) + s ∗ tan(x) + t ∗ x^2 + u = 0 where 0 ≤ x ≤ 1. Input Input consists of multiple test cases and terminated by an EOF. Each test case consists
2015-10-22 00:13:12
1207
1
原创 All in All(送)
You have devised a new encryption technique which encodes a message by inserting between its characters randomly generated strings in a clever way. Because of pending patent issues we will not discuss
2015-10-22 00:04:41
392
原创 Foul Play(决策+递归)
A European soccer tournament has n participating teams. In the first round, n/2 matches are played such that each team plays against one other team. After every round, only the winning teams advance
2015-10-22 00:02:56
572
原创 Invitation Cards(最短路)
Description In the age of television, not many people attend theater performances. Antique Comedians of Malidinesia are aware of this fact. They want to propagate theater and, most of all, Antique Com
2015-10-18 23:25:45
670
原创 Arbitrage(bellman-Ford)
Description Arbitrage is the use of discrepancies in currency exchange rates to transform one unit of a currency into more than one unit of the same currency. For example, suppose that 1 US Dollar buy
2015-10-18 23:23:34
519
原创 MPI Maelstrom(最短路)
Description BIT 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
2015-10-18 23:22:16
389
原创 Wormholes(bellman-Ford)
Description While 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
2015-10-18 23:19:44
347
原创 Currency Exchange(bellman-Ford)
Description Several 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
2015-10-18 23:16:51
411
原创 Silver Cow Party(边取反最短路)
Description One 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
2015-10-18 23:13:38
613
原创 Heavy Transportation(最短路变形)
Description Background 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
2015-10-18 23:09:52
663
原创 Frogger(链式前向星+spfa小改动)
Description Freddy 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
2015-10-18 23:04:29
416
原创 Til the Cows Come Home(链式前向星+spfa)
Description Bessie 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
2015-10-18 23:01:12
355
原创 这题占坑备用(搜索)
Problem DescriptionACdream王国的大数学家NT(Number Theory),发现了一种独特的数,称之为NT数,其定义如下: 1. 长度为1的数都是NT数。 2.对于一个长度大于1的数,当且仅当他能被长度整除,且商为NT数,那么这个数也是NT数。 NT相信这样的数是无穷无尽的!然而他还是想知道在一个区间内这样的数有多少个。 Input多组数据(大约1000组),每组数
2015-10-15 20:09:42
490
原创 NT的表白(数论)
Problem Description经过了很长很长的恋爱马拉松,帅气NT(Number Theory)终于决定要向迷人的CG(Computational Geometry)表白了!(对单身汪造成了0x7fffffff点伤害) CG为了考验NT,于是决定最后再出一道难题。 CG给NT两个整数a,b,说这是我们俩的幸运数字,那么我们孩子(还没结婚就想着孩子= =b)的幸运数字就是1111…1(a个
2015-10-15 20:05:30
514
原创 NT的数字(被8整除)
Problem DescriptionNT(Number Theory) 是一个很帅气的小伙子,从小就喜欢数论,整数神马的最有爱了~ 随着研究的深入,NT遇到的数字越来越大,越来越大,这让他研究的进度受到了阻碍…… 这一天,他拿到了一个很大很大的数,然后想知道这个数能否通过重新排列来被8整除? Input多组数据,每组数据只有一个“大”整数n(0<=n<=10^1000) Output对于每
2015-10-15 19:55:05
531
原创 小Y喜欢拆拆拆(送)
Problem Description小Y最喜欢把东西拆开了,虽然一般都无法组装回去(= =b) 在数学中,有一种一定能组装回去的方式是分解质因数,所以小Y最喜欢分解质因数了!但是小Y不是普通人,当然不想按常人的思路“组装”一个数,于是小Y是用以下方法来“组装”: 1. 对于一个数,如果这个数是合数,那么小Y用正常人的方法进行分解质因数,执行操作2,如果这个数不是合数,那么小Y把这个数写下来,结
2015-10-15 19:49:54
388
原创 数论基础知识测试(送)
Problem Description小Y最喜欢数学了,他有很多关于数学的问题想问你。 作为一个ACMer,你为了能尽快解决问题,当然是编写一个程序来满足小Y的要求。 小Y的问题大概有以下几类: 给定若干个数,求他们的最大公约数。 给定两个数a,b,求第一个数a关于第二个数b的逆元,逆元定义为,ax%b=1的最小正整数x。 给定一个整数a,求不超过这个数的所有数中(1~a-1),与这个数互
2015-10-15 19:46:52
356
原创 ACdream运动会(送)
Problem Description第一届ACdream运动会就要开始了,来自全国34个省级地区的n个高校都派出学生前来参与。(学校编号为1~n)开幕式中有一项活动就是参赛队伍派代表进行演讲,由于中国国情——人多,所以让每个高校都派出代表进行演讲是不切实际的,因此只能让有符合一定条件的学校的代表进行演讲。至于决定哪些学校进行演讲,就由组委会的委员负责。ACdream运动会组委会共m个人,每个人会有
2015-10-15 19:45:12
521
原创 爱爬山的小Z(树状数组求区间最值)
Problem Description从前有一座ACdream王国,这个王国被群山环绕,因此外面的人很少有人知道它的存在。 这个王国里,有一位很喜欢爬山的小伙子,小Z,他觉得在爬山的过程中,能够有一种征服自然的感觉。 小Z定义一条登山路径的困难程度,为整个路径中经过的山的高度的最大值。 然而ACdream王国是一个很神奇的王国,山的高度经常会改变,因此小Z不得不随时重新测量山的高度。 小Z疲
2015-10-15 19:41:43
541
原创 爱探险的小Z(单调队列)
Problem Description从前有一座ACdream王国,这个王国被群山环绕,因此外面的人很少有人知道它的存在。 然而围绕着王国的不仅有山,还有海沟。 这个王国里,有一位很喜欢探险的小伙子,小Z,他觉得在探险的过程中,能够有一种超越自我的感觉。 小Z定义一条探险路径的困难程度,为整个路径中经过的山的高度或海拔的深度的代数和。 由于小Z精力有限,他最多只能经过M座山或海沟。然而他想成
2015-10-15 19:33:20
435
原创 最大的矩形(入门 dp)
Problem Description在ACdream王国中有一排由N个矩形房子组成的住宅区,每个房子高为h[i],小Z想知道,在这些矩形房子中,你能找到的最大矩形面积是多少呢? Input多组数据,对于每组数据,首先是一个整数N,表示房子的数目(1<=N<=100000) 接下来是一行N个整数h[i],表示这些矩形的高度(1<=h[i]<=1000000) Output对于每组数据,输出一个
2015-10-15 19:11:40
695
原创 真正的AC自动机(二分 + 优先队列)
Problem Description自从小Z学了字符串的AC自动机,便觉得非常失望,说好的能够帮我自动AC题目的机器呢?5555555555……. 小Z希望自己发明一个真正的,能够自动AC题目的机器。 他的实现很简单,去ACdream王国请N个ACMers帮他切题目,哇咔咔~真是机智啊!!! 每个ACMer都有自己的能力,只有当题目的难度不超过他的能力,他才能够做出来。 然而由于精力有限,
2015-10-15 19:06:08
447
原创 Parity game
Now and then you play the following game with your friend. Your friend writes down a sequence consisting of zeroes and ones. You choose a continuous subsequence (for example the subsequence from the th
2015-10-07 00:06:53
812
原创 Supermarket
A supermarket has a set Prod of products on sale. It earns a profit px for each product x∈Prod sold by a deadline dx that is measured as an integral number of time units starting from the moment the sa
2015-10-06 23:47:47
621
原创 A Bug's Life
Background Professor Hopper is researching the sexual behavior of a rare species of bugs. He assumes that they feature two different genders and that they only interact with bugs of the opposite gende
2015-10-01 10:26:18
382
原创 Wireless Network
An earthquake takes place in Southeast Asia. The ACM (Asia Cooperated Medical team) have set up a wireless network with the lap computers, but an unexpected aftershock attacked, all computers in the ne
2015-10-01 10:20:03
528
原创 Cube Stacking
Farmer John and Betsy are playing a game with N (1 <= N <= 30,000)identical cubes labeled 1 through N. They start with N stacks, each containing a single cube. Farmer John asks Betsy to perform P (1<=
2015-10-01 10:14:24
463
原创 Find them, Catch them
The police office in Tadu City decides to say ends to the chaos, as launch actions to root up the TWO gangs in the city, Gang Dragon and Gang Snake. However, the police first needs to identify which ga
2015-10-01 00:04:35
496
原创 Ubiquitous Religions
当今世界有很多不同的宗教,很难通晓他们。你有兴趣找出在你的大学里有多少种不同的宗教信仰。 你知道在你的大学里有n个学生(0 < n <= 50000) 。你无法询问每个学生的宗教信仰。此外,许多学生不想说出他们的信仰。避免这些问题的一个方法是问m(0 <= m <= n(n - 1)/ 2)对学生, 问他们是否信仰相同的宗教( 例如他们可能知道他们两个是否去了相同的教堂) 。在这个数据中,你可能不
2015-10-01 00:01:24
474
原创 The Suspects
严重急性呼吸系统综合症( SARS), 一种原因不明的非典型性肺炎,从2003年3月中旬开始被认为是全球威胁。为了减少传播给别人的机会, 最好的策略是隔离可能的患者。 在Not-Spreading-Your-Sickness大学( NSYSU), 有许多学生团体。同一组的学生经常彼此相通,一个学生可以同时加入几个小组。为了防止非典的传播,NSYSU收集了所有学生团体的成员名单。他们的标准操作程序(
2015-10-01 00:00:05
530
空空如也
opencv识别特殊的指针式仪器的指针
2016-03-03
使用opencv对老式水表识别
2016-02-24
MFC中list control中添加进度条
2015-08-29
c++用socket连接,如何把服务器的本地文件夹目录传给客户端
2015-08-08
TA创建的收藏夹 TA关注的收藏夹
TA关注的人