http://acm.fzu.edu.cn/problem.php?pid=2169思路:建立一个邻接表,利用搜索中回溯把走过的路标记为1,然后把这些标记为1的值全部加起来。
Problem 2169 shadowAccept: 97Submit: 274 Time Limit: 1000 mSec...
分类:
其他好文 时间:
2014-07-22 23:16:14
阅读次数:
375
http://acm.nyist.net/JudgeOnline/problem.php?pid=708状态转移方程的思路:对于一个数N,可以是N
- 1的状态+1 得到,另外,也可以是(n / 2) * (1 + 1)得到,同理对于任意的奇数p,都有如果n可以整除p,都有f(n / p) + f(...
分类:
其他好文 时间:
2014-04-30 21:26:26
阅读次数:
519
题目:http://acm.nefu.edu.cn/JudgeOnline/problemshow.php?problem_id=612 1
/*http://acm.nefu.edu.cn/JudgeOnline/problemshow.php?problem_id=612 2
关键是对数处理位数...
分类:
其他好文 时间:
2014-04-30 19:46:56
阅读次数:
411
Cultural blocks1) TaboosPing-pong ball
exerciseTaboos can remove entire families of solutions from the ready grasp of
the problem-solver. This is not ...
分类:
其他好文 时间:
2014-04-30 18:17:21
阅读次数:
462
这个题本来有希望在比赛里面出了的当时也想着用递推 因为后面的数明显是由前面的推过来的但是在计算的时候
因为判重的问题
。。。很无语。我打算用一个tot[i]来存i的总种树,tot[i]+=tot[j]//j为可以由j推到i的一系列数,但这样是不对的,会产生大量重复计算。。。看了下标程才发现要用二维来...
分类:
其他好文 时间:
2014-04-30 15:16:28
阅读次数:
382
没说的 暴力打表#include#includeusing namespace std;int
a[62768];int b[42768];int prime[42768];int main(){ int n=0,j,i;
memset(b,0,sizeof(b)); memset...
分类:
其他好文 时间:
2014-04-29 18:24:19
阅读次数:
435
Validate if a given string is numeric.Some
examples:"0"=>true" 0.1 "=>true"abc"=>false"1
a"=>false"2e10"=>trueNote:It is intended for the problem stat...
分类:
其他好文 时间:
2014-04-29 16:45:45
阅读次数:
398
poj 1279 求半平面交的
面积题目来源:http://poj.org/problem?id=1279分析: 求半平面交的 面积代码如下:const double EPS =
1e-8;const int Max_N = 1505;struct Point{ double x,y; ...
分类:
其他好文 时间:
2014-04-29 16:35:46
阅读次数:
499
好高兴 一上午做了2个题 题意:求素因子只有2 3 5 7 数 约束的个数 我用的时搜索计数法
感觉还应该有比较不错的组合数学方法#includeusing namespace std;__int64 dmax;int prime[4];void
dfs(int t){ if(t>=4) { ...
分类:
其他好文 时间:
2014-04-29 11:21:47
阅读次数:
278
第一次打表一言难尽 注意表的范围 因为打表 数组长度不好计算算
要有个结尾标志#includeusing namespace std;int
prime[1000]={5,7,11,101,131,151,181,191,313,353,373,383,727,757,787,797,919,9.....
分类:
其他好文 时间:
2014-04-29 10:27:47
阅读次数:
471