时间限制:0.25s空间限制:4M题意: 给出一个n个节点,m条边的图,每条边都有标记了编号为1,2,3三种颜色之一,现在求从1号节点到n号节点的一条最短路径的长度,要求该路径中相邻的边没有相同的颜色。Solution: 有限制条件的SPFA,要注意有时要形成环来改变路径颜色,才能到...
分类:
其他好文 时间:
2014-07-11 19:02:01
阅读次数:
199
Viva Confetti
Time Limit: 1000MS
Memory Limit: 10000K
Total Submissions: 761
Accepted: 319
Description
Do you know confetti? They are small discs of colored paper, and...
分类:
其他好文 时间:
2014-07-09 11:14:29
阅读次数:
223
欧拉通路+并查集+字典树
题意是说 木棍两头有颜色,怎么排让它连成一串。颜色相同可以接起来。
最开始想用map水过去,一直TLE。怒点字典树天赋……花了一上午。
字典树不多介绍,我的节点开小了,CE好几次,才想起
“There is no more than 250000 sticks.”
“A word is a sequence of lowercas...
分类:
其他好文 时间:
2014-07-08 17:22:26
阅读次数:
180
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, ...
分类:
其他好文 时间:
2014-07-07 14:54:18
阅读次数:
219
题目如下:
Bicoloring
In 1976 the ``Four Color Map Theorem" was proven with the assistance of acomputer. This theorem states that every map can be colored using only fourcolors, in...
分类:
其他好文 时间:
2014-07-06 12:28:07
阅读次数:
241
题目如下:
Problem A: The Monocycle
A monocycle is a cycle that runs on one wheel and the one we will be considering is a bit more special. It has a solid wheel colored with fiv...
分类:
其他好文 时间:
2014-07-06 11:49:47
阅读次数:
233
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...
分类:
其他好文 时间:
2014-07-01 12:57:43
阅读次数:
179
这道题酝酿三天了,O(∩_∩)O哈哈~,其实就是懒~~而且是1A哦~算是近期做的比较难的一道题了。本题可以参考刘汝佳的《算法竞赛入门经典训练指南》里第一章例8(Colored Cubes, LA 3401),本题只是书中例题的简化版。问题分析:怎么判断两个正方体是否相等呢?我是用一个结构体来存放CU...
分类:
其他好文 时间:
2014-07-01 10:11:23
阅读次数:
492
Consecutive Blocks
Time Limit: 2 Seconds
Memory Limit: 65536 KB
There are N (1 ≤ N ≤ 105) colored blocks (numbered 1 to
N from left to right) which are lined up in a row. And the i-th b...
分类:
其他好文 时间:
2014-07-01 06:51:52
阅读次数:
218
原创文章如需转载请注明:转载自脱莫柔Unity3D学习之旅QQ群:【119706192】本文链接地址:灰度shader废话不多说,直接图解流程:1.原图2.改动shader打开NGUI自带的shader:(Unlit - Transparent Colored)将代码A:fixed4 frag (v...
分类:
其他好文 时间:
2014-07-01 00:31:34
阅读次数:
574