B. Mr. Kitayuta's Colorful Graph
求不同颜色路径的个数,Floyd算法的应用。...
分类:
编程语言 时间:
2015-01-22 11:11:45
阅读次数:
249
Round Numbers
Time Limit: 2000MS
Memory Limit: 65536K
Total Submissions: 9525
Accepted: 3420
Description
The cows, as you know, have no fingers or thumbs and thus are...
分类:
其他好文 时间:
2015-01-22 11:07:03
阅读次数:
201
C:题目中步数看似很多,其实最多就增长250步左右,因为移动的步数为1 + 2 + 3 + .. n,所以大概只会有sqrt(n)步,所以dp[i][j]表示在i位置,增长为j步的值,然后转移即可
D:这题其实对于一个联通块,最多只需要n条边,最少要n - 1条,那么判断的条件,就是这个联通块是否有环,利用拓扑排序去判即可
代码:
C:
#include
#include
#inclu...
分类:
其他好文 时间:
2015-01-22 07:00:06
阅读次数:
212
A:求区间内素因子个数等于n的数有多少个解题思路:筛法解题代码: 1 // File Name: a.cpp 2 // Author: darkdream 3 // Created Time: 2015年01月18日 星期日 13时54分20秒 4 5 #include 6 #include 7 ....
分类:
其他好文 时间:
2015-01-21 23:48:41
阅读次数:
173
简单题,却犯了两个错误导致WA了多次。第一是程序容错性不好,没有考虑到输入数据中可能给实际已经罚下场的人再来牌,这种情况在system测试数据里是有的。。。二是chronologically这个词没注意,其实如果输入是按时间顺序的,就直接在线处理就行了,用不着int team1[110][110],...
分类:
其他好文 时间:
2015-01-21 21:54:08
阅读次数:
164
private static int getRandom(int count) { return (int) Math.round(Math.random() * (count)); } private static String string = "abcde...
分类:
编程语言 时间:
2015-01-21 19:35:26
阅读次数:
184
题目描述:
Autocomplete25 points
Since you crave state-of-the-art technology, you've just purchased a phone with a grea...
分类:
其他好文 时间:
2015-01-21 10:21:20
阅读次数:
261
题目描述:
Winning at Sports25 points
In the game of Sports, the object is have more points than the other team after a cer...
题目描述:
Homework10 points
Your first-grade math teacher, Mr. Book, has just introduced you to an amazing new co...
分类:
其他好文 时间:
2015-01-21 08:59:29
阅读次数:
158