题目链接:http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=14151388748310474Where is the Marble?AcceptedC++0....
分类:
其他好文 时间:
2014-07-16 17:41:46
阅读次数:
195
Shoemaker's Problem
Shoemaker has N jobs (orders from customers) which he must make. Shoemaker can work on only one job in each day. For each ith job, it is known the integer Ti (1i<=1000...
分类:
其他好文 时间:
2014-07-16 17:12:33
阅读次数:
274
题目如下:
Getting in Line
Computer networking requires that the computers in the network be linked.
This problem considers a ``linear" network in which the computers are chaine...
分类:
其他好文 时间:
2014-07-16 17:11:41
阅读次数:
245
设函数 f(k)(n);则: f(1)(n)=1; f(2)(n)=f(1)(0)+f(1)(1)+f(1)(2)+...+f(1)(n); f(3)(n)=f(2)(0)+f(2)(1)+f(2)(2)+...+f(2)(n); . . . f(...
分类:
其他好文 时间:
2014-07-16 15:46:09
阅读次数:
168
uva11732:http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&category=&problem=2832&mosmsg=Submission+received+with...
分类:
其他好文 时间:
2014-07-16 15:24:49
阅读次数:
370
比较不错的一个题,关键是理解状态转移#include#include#include#include#define maxn 55using namespace std;int m,ans;int num[maxn],vis[maxn];bool cnt[1000009];int scale[10]...
分类:
其他好文 时间:
2014-07-16 15:06:35
阅读次数:
216
题意: lcm(a, b) = c; c是a,b的最小共倍数, 现在给出a, c, 要你求出最小的b.解题思路:1. 如果c%a != 0 表示无解. 设b = c/a; 当gcd(a, b)==1时, 表示b就是要求的结果. 如果gcd(a, b) != 1;那么lcm(a, b)一定小于c. 你...
分类:
其他好文 时间:
2014-07-16 14:55:44
阅读次数:
216
UVA 1482 - Playing With Stones
题目链接
题意:给定n堆石头,每次选一堆取至少一个,不超过一半的石子,最后不能取的输,问是否先手必胜
思路:数值很大,无法直接递推sg函数,打出前30项的sg函数找规律
代码:
#include
#include
int t, n;
long long num;
long long SG(long ...
分类:
其他好文 时间:
2014-07-16 14:47:36
阅读次数:
206
UVA 11859 - Division Game
题目链接
题意:给定一个矩阵,每次能选一行中几个数字,把他们变成他们的因子,最后不能变的人输,问是否能先手必胜
思路:转变成因子等价于删去一些素数,这样问题转化为了Nim游戏
代码:
#include
#include
const int N = 10005;
int t, n, m, num, cnt[N],...
分类:
其他好文 时间:
2014-07-16 14:25:19
阅读次数:
212
The Dole Queue
In a serious attempt to downsize (reduce) the dole queue, The New National Green Labour Rhinoceros Party has decided on the following strategy. Every day all dole applicants...
分类:
其他好文 时间:
2014-07-16 08:38:31
阅读次数:
311