The final classified generally as Honma Beres place in Japan EMPLOYEES bags for sale but ?? I love the ability to jump in and take the set. For someon...
分类:
其他好文 时间:
2014-08-13 12:44:06
阅读次数:
217
题目:hdu4944FSF’s game(数论)
题目大意:给定N,然后会有N * ( N + 1)/2个等级的矩形,(1 * 1, 2 * 1, 2* 2, ...N * 1, N * 2.. N* N).将这些矩阵分成大小相同的K * K 的正方形,能够获得金币A * B / gcd(A
/ K, B/ K);然后给定N,问能够得到的总金币。
解题思路:对于sum(N):...
分类:
其他好文 时间:
2014-08-13 10:31:50
阅读次数:
262
Problem StatementThe Happy Letter game is played as follows: At the beginning, several players enter the field. Each player has a lowercase English le...
分类:
移动开发 时间:
2014-08-13 03:33:35
阅读次数:
201
Description
In the two-player game "Two Ends", an even number of cards is laid out in a row. On each card, face up, is written a positive integer. Players take turns removing a card from either end...
分类:
其他好文 时间:
2014-08-13 01:18:05
阅读次数:
209
#include
#include
typedef unsigned long long ll;
const ll MOD = (1ULL<<32);
const int N = 500001;
int t, n;
ll ans[N], frc[N];
void init() {
for (ll i = 1; i < N; i++) {
for (ll j = i; j < ...
分类:
其他好文 时间:
2014-08-13 01:14:05
阅读次数:
218
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
根据筒井哲也漫画原作拍摄的真人电影《予告犯》公布了主演阵容。 《予告犯》漫画原作从2011年到2013年在《JUMP 改》(集英社)上连载,讲述通过视频网站发出犯罪预告,以制裁之名进行犯罪的神秘组织“新闻纸”带来...
分类:
其他好文 时间:
2014-08-12 22:20:45
阅读次数:
395
题目链接: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