会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
Fray
上一页
1
2
3
4
5
下一页
2013年5月12日
卡塔兰数
摘要: http://hi.baidu.com/nicker2010/item/b99d3584044f9d20110ef3ed
阅读全文
posted @ 2013-05-12 22:27 Fray
阅读(97)
评论(0)
推荐(0)
2013年5月7日
突然想到几点
该文被密码保护。
阅读全文
posted @ 2013-05-07 19:52 Fray
阅读(1)
评论(0)
推荐(0)
日记07/05/2013
该文被密码保护。
阅读全文
posted @ 2013-05-07 19:47 Fray
阅读(3)
评论(0)
推荐(0)
2013年5月6日
UVA 10010 Where's Waldorf?
摘要: AC代码#include<stdio.h>#include<string.h>#include<ctype.h>#define clr(a,b); memset(a,b,sizeof(a));char a[100][100];char word[30][100];int dir[8][2]={{1,0},{1,1},{1,-1},{0,1},{0,-1},{-1,1},{-1,-1},{-1,0}};int flag;int main(){ //freopen("in.txt","r",stdin); //freope
阅读全文
posted @ 2013-05-06 20:06 Fray
阅读(194)
评论(0)
推荐(0)
2013年5月5日
不会做的题目
摘要: http://acm.hust.edu.cn/vjudge/contest/view.action?cid=23210#problem/Chttp://acm.hust.edu.cn/vjudge/contest/view.action?cid=23137#problem/B
阅读全文
posted @ 2013-05-05 20:02 Fray
阅读(111)
评论(0)
推荐(0)
日记05/05/2013
该文被密码保护。
阅读全文
posted @ 2013-05-05 19:49 Fray
阅读(0)
评论(0)
推荐(0)
2013年4月30日
Flood Fill 算法
摘要: http://hi.baidu.com/11magic/item/b0d72a77d76ea122d7a89cfbUVA 的斜线迷宫题 真的学到不少http://wenku.baidu.com/view/8ed5b30702020740be1e9bfb.htmlView Code #include<stdio.h>#include<string.h>#include<iostream>#include<queue>#define clr(a,b); memset(a,b,sizeof(a));using namespace std;int m,n
阅读全文
posted @ 2013-04-30 20:31 Fray
阅读(318)
评论(0)
推荐(1)
2013年4月29日
拓扑排序
摘要: View Code #include<iostream>#include<string.h>#include<stdio.h>using namespace std;int timef = 0;int n,m ;int x,y;int a[1000][1000];// 图的邻接矩阵int f[1000]; //完成时间int vis[1000]; //1代表 被发现 2代表 已完成void DFS(int u){ vis[u] = 1; //记录发现时刻 for(int v=1; v<=n; v++) //adj(u) //O(E) ...
阅读全文
posted @ 2013-04-29 17:37 Fray
阅读(141)
评论(0)
推荐(0)
快速幂与快速幂取模
摘要: 1.快速幂(位运算)View Code #include<stdio.h>int pow(int a,int b){ int r=1; int base=a; while(b!=0) { if(b&1) r*=base; base*=base; b>>=1; } return r;}int main(){ int m;int n; while(scanf("%d%d",&m,&n)!=EOF) { printf("%d\n",pow(m,n)); } retu...
阅读全文
posted @ 2013-04-29 13:39 Fray
阅读(191)
评论(0)
推荐(0)
2013年4月19日
大数问题
摘要: 大数问题 组合数学http://wenku.baidu.com/view/3e47bd639b6648d7c1c7469a.htmlhttp://wenku.baidu.com/view/727ad90cbb68a98271fefa88.html如何进行乘法View Code for(i=0;i<nLen2;i++){ for(j=0;j<nLen1;j++) aResult[i+j]+=an2[i]*an1[j];}for(i=0;i<MAX_LEN*2;i++){ if(aResult[i]>=10) { aResult[i+1]+=aResu...
阅读全文
posted @ 2013-04-19 18:58 Fray
阅读(188)
评论(0)
推荐(0)
上一页
1
2
3
4
5
下一页
公告
导航
博客园
首页
新随笔
联系
订阅
管理