码迷,mamicode.com
首页 >  
搜索关键字:c. kyoya and colored    ( 385个结果
Codeforces Round #403 div2 C. Andryusha and Colored Balloons
题目链接:Codeforces Round #403 div2 C. Andryusha and Colored Balloons 题意: 给你一棵n个节点的树,然后让你染色,规定相连的三个 节点不能同色,问需要的最少颜色,并输出其中一种方案。 题解: 因为只有相邻3个节点不同色。 所以直接DFS, ...
分类:其他好文   时间:2017-03-06 14:35:42    阅读次数:204
Codeforces Round #403 (Div. 1, based on Technocup 2017 Finals)
Codeforces #403 Div1.A~D(Div2.B~F)简要题解 [ Div2.B.The Meeting Place Cannot Be Changed | A.Andryusha and Colored Balloons | B.Innokenty and a Football L... ...
分类:其他好文   时间:2017-03-06 12:12:16    阅读次数:262
UVaLive 3401 Colored Cubes (暴力)
题意:给定n个立方体,让你重新涂尽量少的面,使得所有立方体都相同。 析:暴力求出每一种姿态,然后枚举每一种立方体的姿态,求出最少值。 代码如下: ...
分类:其他好文   时间:2017-02-17 00:07:55    阅读次数:169
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, ...
分类:其他好文   时间:2017-02-02 10:47:18    阅读次数:157
BZOJ 3093: [Fdu校赛2012] A Famous Game
3093: [Fdu校赛2012] A Famous Game Description Mr. B and Mr. M like to play with balls. They have many balls colored in blue and red. Firstly, Mr. B rand ...
分类:其他好文   时间:2017-01-23 15:32:31    阅读次数:191
【滚动数组】【状压dp】Gym - 100956F - Colored Path
f(i,j,S)表示到(i,j),且经由的路径上的颜色集合为S的价值的最小值,从上方和左方转移过来即可。 要注意,内存不足,需要滚动数组优化,即使用了map,还是需要。 路径输出的时候,可以再跑一遍dp,这样就不用再开一个大数组了。 我的写法比较菜。卡了常数 ...
分类:编程语言   时间:2017-01-15 22:56:01    阅读次数:261
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, ...
分类:其他好文   时间:2017-01-07 09:08:10    阅读次数:175
挑战程序2.1.4 穷竭搜索>>深度优先搜索 练习题 POJ1979黑与红
http://poj.org/problem?id=1979 Description There is a rectangular room, covered with square tiles. Each tile is colored either red or black. A man is ...
分类:其他好文   时间:2016-12-07 20:03:53    阅读次数:304
Red and Black
Red and Black Problem Description There is a rectangular room, covered with square tiles. Each tile is colored either red or black. A man is standing ...
分类:其他好文   时间:2016-11-08 01:27:19    阅读次数:167
POJ2513 Colored Sticks
Time Limit: 5000MS Memory Limit: 128000K Total Submissions: 36032 Accepted: 9427 Description You are given a bunch of wooden sticks. Each endpoint of ...
分类:其他好文   时间:2016-11-01 19:38:03    阅读次数:191
385条   上一页 1 ... 9 10 11 12 13 ... 39 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!