码迷,mamicode.com
首页 >  
搜索关键字:uvalive    ( 873个结果
UVALive-4287 Proving Equivalences 有向图的强连通分量+缩点
题意:有n个命题,已知其中的m个推导,要证明n个命题全部等价(等价具有传递性),最少还需要做出几次推导。 思路:由已知的推导可以建一张无向图,则问题变成了最少需要增加几条边能使图变成强连通图。找出所有的强连通分量,将每一个连通分量视作一个大节点,则整张图变成了一张DAG。设出度为0的大节点个数为b,
分类:其他好文   时间:2016-02-24 22:31:45    阅读次数:258
uvalive 3938 "Ray, Pass me the dishes!" 线段树 区间合并
题意:求q次询问的静态区间连续最大和起始位置和终止位置 输出字典序最小的解. 思路:刘汝佳白书 每个节点维护三个值 pre, sub, suf 最大的前缀和, 连续和, 后缀和 然后这个题还要记录解的位置所以还要区间总和sum 1 #include<iostream> 2 #include<stri
分类:其他好文   时间:2016-02-16 20:44:35    阅读次数:202
【UVALive 7334】Kernel Knights
题 题意 有两个队的骑士1到n和n+1到2n,每个骑士只能互相攻击对手队的一个骑士。kernel的意思是在这个kernel里的骑士不会互相攻击,在kernel外的骑士被kernel里的骑士攻击。 现在告诉你所有骑士攻击的骑士,求一个kernel。 分析 没人攻击的骑士一定在kernel里,把没人攻击
分类:其他好文   时间:2016-02-16 18:36:48    阅读次数:233
UVALive 5741 Wealthy Family
树形背包。DP递推的思路很简单.... 但是由于节点有15万个,先不论空间复杂度,这样开dp数组 dp[150000+10][300+10],如果初始化是memset(dp,-1,sizeof dp),则必然超时。 所以需要一个状态数剪枝。。。即记录这个节点最多组合的数量。 UVALive是不限制内
分类:其他好文   时间:2016-02-10 10:58:55    阅读次数:237
UVALive 3989 Ladies&#39; Choice
经典的稳定婚姻匹配问题 UVALive - 3989 Ladies' Choice Time Limit: 6000MS Memory Limit: Unknown 64bit IO Format: %lld & %llu [Submit] [Go Back] [Status] Descriptio
分类:其他好文   时间:2016-01-28 16:41:31    阅读次数:167
UVALive 4223 / HDU 2962 spfa + 二分
TruckingProblem DescriptionA certain local trucking company would like to transport some goods on a cargo truck from one place to another. It is desir...
分类:其他好文   时间:2016-01-23 01:24:21    阅读次数:139
UVALive 4192/HDU 2959 Close Enough Computations 数学
Close Enough ComputationsProblem DescriptionThe nutritional food label has become ubiquitous. A sample label is shown to the right. On the label the n...
分类:其他好文   时间:2016-01-22 21:08:00    阅读次数:200
UVALive 4222 /HDU 2961 Dance 大模拟
DanceProblem DescriptionFor a dance to be proper in the Altered Culture of Machinema, it must abide by the following rules:1. A dip can only appear 1 ...
分类:其他好文   时间:2016-01-22 21:02:03    阅读次数:315
UVALive 6527 Counting ones dfs(水
题目链接:点击打开链接#include #include using namespace std;typedef long long ll;ll re;vector p;void dfs(int dep, int g) { if (dep == 0) return ; if (p[dep-1] =....
分类:其他好文   时间:2016-01-21 15:46:22    阅读次数:140
[UVALive 6663 Count the Regions] (dfs + 离散化)
链接:https://icpcarchive.ecs.baylor.edu/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=4675题目大意:在一个平面上有 n (1#include#include#includ...
分类:其他好文   时间:2016-01-16 22:32:58    阅读次数:354
873条   上一页 1 ... 42 43 44 45 46 ... 88 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!