10 2016 档案
摘要:zy兄发现了一个神奇的递推公式, 某些递推的题目可以看作, 一个个上三角阵, 而问题的解为(1,1) 至 (n,n) 的路径个数, 废话不多说, 上题上代码 以下转自http://www.cnblogs.com/--ZHIYUAN/p/5971367.html 小兔的棋盘 Time Limit: 1
阅读全文
摘要:``` Problem Description Given a positive integer N, you should output the leftmost digit of N^N. Input The input contains several test cases. The firs
阅读全文
摘要:一次生日Party可能有p人或者q人参加,现准备有一个大蛋糕.问最少要将蛋糕切成多少块(每块大小不一定相等),才能使p人或者q人出席的任何一种情况,都能平均将蛋糕分食. Input 每行有两个数p和q. Output 输出最少要将蛋糕切成多少块. Sample Input 2 3 Sample Ou
阅读全文
摘要:time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Archeologists have found a secret pass i
阅读全文
摘要:Bill Total Value time limit per test 1 second time limit per test memory limit per test 256 megabytes memory limit per test input standard input input
阅读全文
摘要:http://codeforces.com/contest/727/problem/A Transformation: from A to B time limit per test 1 second time limit per test memory limit per test 256 meg
阅读全文
摘要:利用BFS求图的最短路, POJ3984 在这里,BFS求出了每个点到起点的最短距离 注意, 只要"某个点到起点的距离"从初始状态被赋值, 那么这个值就是最优的, 因为可以把BFS之后的图看为是一个BFS树, 某点的所在的"层数"就是其到起点的距离, 当其被BFS第二次的时候的"层数"一定 大于或等
阅读全文
摘要:time limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given a string s, consisting of lowercas
阅读全文

浙公网安备 33010602011771号