题目链接:http://poj.org/problem?id=1511 有向图有n个点m条边,求点1到其他n-1个点的最短距离和+其他点到点1的最小距离和; 和poj3268一样,但是本题的数据范围较大,只能用spfa+邻接表写,不能用vector; 两个spfa即可; #include <iost ...
分类:
其他好文 时间:
2016-08-27 16:45:25
阅读次数:
175
[POJ1003]Hangover 试题描述 How far can you make a stack of cards overhang a table? If you have one card, you can create a maximum overhang of half a card ...
分类:
其他好文 时间:
2016-08-26 09:07:44
阅读次数:
208
这两天回家了 家里电脑太卡 调试不方便 就只能写写水题了…… ...
分类:
其他好文 时间:
2016-08-17 01:23:17
阅读次数:
124
Invitation Cards
Time Limit: 8000MS
Memory Limit: 262144K
Total Submissions: 25219
Accepted: 8346
Description
In the age of television, not many people attend theat...
分类:
编程语言 时间:
2016-08-15 19:14:50
阅读次数:
205
Problem Description Alice and Bob's game never ends. Today, they introduce a new game. In this game, both of them have N different rectangular cards r ...
分类:
其他好文 时间:
2016-08-13 14:11:28
阅读次数:
170
DescriptionIn 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 Comed...
分类:
其他好文 时间:
2016-08-13 11:28:32
阅读次数:
133
题意呢 就是有两种售票方式 一种是icpc 一种是其他方式 icpc抢票成功的概率是其他方式的2倍…… 这时 一个人出现了 他通过内幕知道了两种抢票方式各有多少人 他想知道自己如果用icpc抢票成功的概率是多少 用acm抢票成功的概率是多少…… 做过不多的概率dp 还在摸索…… dp[i][j]代表 ...
分类:
其他好文 时间:
2016-08-09 22:07:25
阅读次数:
276
UVALive-7278 - Game of Cards
题目大意:A、B两个人玩游戏。A先手,问最后谁赢。游戏规则:
给出n堆纸牌,可任意选择其中一堆,记为x
在x的顶部可取走[0,k]张纸牌,该堆纸牌至少留下一张
x剩下来的纸牌中,记顶部的纸牌值为y,则移除最顶部的y张纸牌(即该堆至少还剩下y张纸牌才是合法)
如果有人不能进行合法移动,则输了。
题目思路:主要是写SG函数,每一堆的sg函数都不同...
分类:
其他好文 时间:
2016-08-06 19:13:54
阅读次数:
118
Invitation Cards Font: Times New Roman | Verdana | Georgia Font Size: ← → Problem Description In the age of television, not many people attend theater ...
分类:
其他好文 时间:
2016-08-04 22:52:22
阅读次数:
216
Description Vasya has started watching football games. He has learned that for some fouls the players receive yellow cards, and for some fouls they re ...
分类:
其他好文 时间:
2016-08-03 21:41:20
阅读次数:
139