2013年5月12日

摘要: http://hi.baidu.com/nicker2010/item/b99d3584044f9d20110ef3ed 阅读全文
posted @ 2013-05-12 22:27 Fray 阅读(95) 评论(0) 推荐(0) 编辑

2013年5月7日

该文被密码保护。 阅读全文
posted @ 2013-05-07 19:52 Fray 阅读(1) 评论(0) 推荐(0) 编辑
该文被密码保护。 阅读全文
posted @ 2013-05-07 19:47 Fray 阅读(3) 评论(0) 推荐(0) 编辑

2013年5月6日

摘要: 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 阅读(188) 评论(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 阅读(105) 评论(0) 推荐(0) 编辑
该文被密码保护。 阅读全文
posted @ 2013-05-05 19:49 Fray 阅读(0) 评论(0) 推荐(0) 编辑

2013年4月30日

摘要: 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 阅读(312) 评论(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 阅读(129) 评论(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 阅读(180) 评论(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 阅读(181) 评论(0) 推荐(0) 编辑

导航