Given an array of non-negative integers, you are initially positioned at the first index of the array.Each element in the array represents your maximu...
分类:
其他好文 时间:
2014-08-13 00:28:34
阅读次数:
324
题目链接:hdu 4944 FSF’s game
题目大意:给定N,可以用不大于N的长a和宽b,组成N?(N?1)2种不同的矩形,对于每个矩形a?b要计算它的值,K为矩形a,b可以拆分成若干个K?K的正方形。∑a?bgcd(a/k,b/k),输出所有矩形值的和。
解题思路:假设有边a和b,那么k肯定即使a的因子也是b的因子。定义f(n)为矩形最长边等于n的情况下所有矩形值的和。那么f(...
分类:
其他好文 时间:
2014-08-12 22:17:44
阅读次数:
322
题目链接
题意:给定一个整数n,求∑f(i, j)(1
思路:依题意,我们可以得到一个递推式ans[n] = ans[n - 1] + ∑f(n, j)(1
对于∑f(n, j)而言,我们用aj(1 <= j <= n)表示gcd(n/k, j/k)所能取到的值的集合,那么可以得到∑f(n, j) = (n * 1 / a1 + n * 2 / a2 + ... + ...
分类:
其他好文 时间:
2014-08-12 22:07:34
阅读次数:
218
Problem Description
FSF has programmed a game.
In this game, players need to divide a rectangle into several same squares.
The length and width of rectangles are integer, and of course the side len...
分类:
其他好文 时间:
2014-08-12 22:06:04
阅读次数:
248
FSF’s gameProblem DescriptionFSF has programmed a game.In this game, players need to divide a rectangle into several same squares.The length and width...
分类:
其他好文 时间:
2014-08-12 21:51:44
阅读次数:
276
Problem DescriptionFSF is addicted to a stupid tower defense game. The goal of tower defense games is to try to stop enemies from crossing a map by bu...
分类:
其他好文 时间:
2014-08-12 21:41:14
阅读次数:
200
Stupid Tower DefenseProblem DescriptionFSF is addicted to a stupid tower defense game. The goal of tower defense games is to try to stop enemies from ...
分类:
其他好文 时间:
2014-08-12 21:31:34
阅读次数:
183
1、掌握ClippingNode的原理与使用
2、创建Cocos工程
3、在HelloWorld.cpp代码中添加如下代码:
auto clip = ClippingNode::create();//创建裁剪节点
auto gameTitle = Sprite::create("game_title.png");
clip->setStencil(gameTitle);//设...
分类:
其他好文 时间:
2014-08-12 19:04:24
阅读次数:
196
1666: [Usaco2006 Oct]Another Cow Number Game 奶牛的数字游戏Time Limit:5 SecMemory Limit:64 MBSubmit:502Solved:432[Submit][Status]Description奶牛们又在玩一种无聊的数字游戏。输...
分类:
其他好文 时间:
2014-08-12 18:10:04
阅读次数:
212
Problem Description
Let's play a card game called Gap.
You have 28 cards labeled with two-digit numbers. The first digit (from 1 to 4) represents the suit of the card, and the second digit (from 1 ...
分类:
其他好文 时间:
2014-08-12 10:24:14
阅读次数:
379