当对问题建立数学模型后,发现其是一个差分方程组,那么问题可以转换为最短路问题,一下分别选用Bellmanford-SPFA解题 ZOJ2770-Burn the Linked Camp POJ1201_Intervals ...
分类:
其他好文 时间:
2016-05-21 21:50:37
阅读次数:
399
Rotating Scoreboard Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 6420 Accepted: 2550 Description This year, ACM/ICPC World finals will b ...
分类:
其他好文 时间:
2016-05-20 00:41:56
阅读次数:
315
Problem Description Ignatius has just come back school from the 30th ACM/ICPC. Now he has a lot of homework to do. Every teacher gives him a deadline ...
分类:
其他好文 时间:
2016-05-19 19:01:37
阅读次数:
152
以Floyd解法为主的练习题六道 ZOJ2027-Travelling Fee POJ2253-Frogger POJ2472-106 miles to Chicago POJ1125-Stockbroker Grapevine POJ1603-Risk POJ2607-Fire Station 这 ...
分类:
其他好文 时间:
2016-05-16 23:16:46
阅读次数:
260
Problem B: Handing Out Candies Description After the 40th ACM-ICPC, Diao Yang is thinking about finding a girlfriend because he feels very lonely when ...
分类:
其他好文 时间:
2016-05-15 16:53:39
阅读次数:
167
Problem B: Handing Out Candies Description After the 40th ACM-ICPC, Diao Yang is thinking about finding a girlfriend because he feels very lonely when ...
分类:
其他好文 时间:
2016-05-14 18:45:01
阅读次数:
177
广度优先搜索(BFS)(附例题)问题产生:Isenbaev是国外的一个大牛。现在有许多人要参加ACM ICPC。一共有n个组,每组3个人。同组的3个人都是队友。大家都想知道自己与大牛的最小距离是多少。大牛与自己的最小距离当然是0。大牛的队友和大牛的最小距离是1。大牛的队友的队友和大牛的最小距离是2……以此类推。如果实在和大牛没有关系的只好输出undefined了。第一行读入n。表示有n个组。1 ≤...
分类:
编程语言 时间:
2016-05-13 00:26:21
阅读次数:
430
这种问题先对区间和线段进行排序,排序方法见代码cmp
然后分析其中一个点,用sum求值
poj 3067
Description
Japan plans to welcome the ACM ICPC World Finals and a lot of roads must be built for the venue. Japan is tal...
分类:
编程语言 时间:
2016-05-12 18:46:21
阅读次数:
263
两道题都需要进行双向SPFA,比范例复杂,代码也较长,其中第二题应该可以用DFS或者BFS做,如果用DFS可能需要的剪枝较多。 ZOJ3088-Easter Holydays ZOJ3103-Cliff Climbing ...
分类:
其他好文 时间:
2016-05-11 13:15:24
阅读次数:
160
两道以SPFA算法求解的最短路问题,比较水,第二题需要掌握如何判断负权值回路。 ...
分类:
其他好文 时间:
2016-05-09 23:30:20
阅读次数:
313