Problem Description
XQ,one of the three Sailormoon girls,is usually playing mobile games on the class.Her favorite mobile game is called “The Princess In The Wall”.Now she give you a problem about th...
分类:
其他好文 时间:
2014-08-13 18:57:07
阅读次数:
224
Gnome TetravexTime Limit:10 Seconds Memory Limit:32768 KBHart is engaged in playing an interesting game, Gnome Tetravex, these days. In the game, at t...
分类:
其他好文 时间:
2014-08-13 18:40:46
阅读次数:
228
Problem Description
FSF 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 building traps to slow them down and towers which...
分类:
其他好文 时间:
2014-08-13 13:14:47
阅读次数:
196
最开始的时候思路就想错了,就不说错误的思路了。因为这n个数的总和是一定的,所以在取数的时候不是让自己尽可能拿的最多,而是让对方尽量取得最少。记忆化搜索:d(i, j)表示原序列中第i个元素到第j个元素构成的子序列,先手取数能够得到的最大值。sum(i, j) 表示从第i个元素到第j个元素的和因为要让...
分类:
其他好文 时间:
2014-08-13 12:47:56
阅读次数:
247
题目: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
题目链接: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