码迷,mamicode.com
首页 >  
搜索关键字:hdu acm 状态压缩    ( 41640个结果
福州大学 Problem 2169 shadow
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
[ACM] 线段树模板
#include#includeusing namespace std;#define maxn 200005class Node{public: int l,r; int add;//附加值 int sum;}node[maxn];int getRight(int n){//获得...
分类:其他好文   时间:2014-07-22 23:14:14    阅读次数:431
山东省第三届acm
#include #include using namespace std;int s[4],p[4];long long llmax(long long a,long long b){ return a>b?a:b;}int main(){ int t; cin>>t; int c=1; whil...
分类:其他好文   时间:2014-07-22 23:13:54    阅读次数:307
[HDU 1166 敌兵布阵] 线段树 或 树状数组
1 #include 2 #include 3 #include 4 using namespace std; 5 int n,C[50005]; 6 //-------------------------- 7 int lowbit(int x){ 8 return x&-x; 9 }1...
分类:其他好文   时间:2014-07-22 23:12:33    阅读次数:311
hdu 2050 折线分割平面 (递推)
折线分割平面Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 15709Accepted Submission(s): 10836Problem De...
分类:其他好文   时间:2014-04-30 21:37:40    阅读次数:516
nyoj 708 ones 动态规划
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
hdu 1576
模线性方程的基本应用#includeusing namespace std;int exgcd(int a,int b,int &x,int &y){ if(b==0) { x=1; y=0; return a; } int d=ex...
分类:其他好文   时间:2014-04-30 14:33:27    阅读次数:326
hdu 2999 sg函数(简单博弈)
Stone Game, Why are you always there?Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 393Accepted S...
分类:其他好文   时间:2014-04-29 17:23:45    阅读次数:444
hdu 1195:Open the Lock(暴力BFS广搜)
Open the LockTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 3847Accepted Submission(s): 1661Probl...
分类:其他好文   时间:2014-04-29 16:35:47    阅读次数:450
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!