码迷,mamicode.com
首页 >  
搜索关键字:c. kyoya and colored    ( 385个结果
【CF553E】Kyoya and Train 最短路+cdq分治+FFT
【CF553E】Kyoya and Train 题意:有一张$n$个点到$m$条边的有向图,经过第i条边要花$c_i$元钱,经过第i条边有$p_{i,k}$的概率要耗时k分钟。你想从1走到n,但是如果整个过程耗时超过了$t$,则需要额外花费$f$元。求从1走到n的期望最小花费。 $n\le 50,m ...
分类:其他好文   时间:2018-04-01 10:38:14    阅读次数:140
75. Sort Colors
75. Sort Colors 题目 Given an array with n objects colored red, white or blue, sort them so that objects of the same color are adjacent, with the colors ...
分类:其他好文   时间:2018-03-31 16:39:31    阅读次数:137
POJ2513_Colored Sticks_KEY
题目传送门 题目大意:给你若干根木棍,每根木棍有前后两种颜色,连接两根木棍需要前后颜色相同,求能否将所有木棍连接在一起。 Solution: 不要将木棍看成点,将颜色看成点。 其实就是求是否存在欧拉路径。 有欧拉路径要满足两个条件: 图是连通图。 没有或只有两个入度为奇数的点。 判断连通性用并查集。 ...
分类:其他好文   时间:2018-03-14 12:46:45    阅读次数:169
POJ2513 Colored Sticks(Trie+欧拉回路)
Description You are given a bunch of wooden sticks. Each endpoint of each stick is colored with some color. Is it possible to align the sticks in a st ...
分类:其他好文   时间:2018-03-03 14:06:56    阅读次数:167
[LeetCode] 75. Sort Colors 颜色排序
Given an array with n objects colored red, white or blue, sort them so that objects of the same color are adjacent, with the colors in the order red, ...
分类:编程语言   时间:2018-03-03 11:02:41    阅读次数:258
75. Sort Colors(荷兰国旗问题 三指针)
Given an array with n objects colored red, white or blue, sort them so that objects of the same color are adjacent, with the colors in the order red, ...
分类:其他好文   时间:2018-02-20 23:34:41    阅读次数:210
POJ 2513 -- Colored Sticks
Colored Sticks Time Limit: 5000MS Memory Limit: 128000K Total Submissions: 38355 Accepted: 10044 Description You are given a bunch of wooden sticks. E ...
分类:其他好文   时间:2018-02-13 12:32:20    阅读次数:187
●codeforces 553E Kyoya and Train
题链: http://codeforces.com/problemset/problem/623/E 题解: FFT,DP 题意: 一个有向图,给出每条边的起点u,终点v,费用c,以及花费每种时间的概率P[e][j](表示走第e条边花费时间为j的概率) 现在需要从1号点走到n号点,如果不能在T个单位 ...
分类:其他好文   时间:2018-01-24 15:35:33    阅读次数:149
ZOJ - 1610 Count the Colors 线段树区间修改
Painting some colored segments on a line, some previously painted segments may be covered by some the subsequent ones. Your task is counting the segme ...
分类:其他好文   时间:2018-01-19 18:52:57    阅读次数:186
[LeetCode] 75. Sort Colors Java
题目: Given an array with n objects colored red, white or blue, sort them so that objects of the same color are adjacent, with the colors in the order r ...
分类:编程语言   时间:2017-12-21 11:50:59    阅读次数:202
385条   上一页 1 ... 4 5 6 7 8 ... 39 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!