摘要: 题目链接:http://acm.zzuli.edu.cn/showproblem?problem_id=1319本体也是一个深搜,之前我的文章应该有关于深搜的题目……可以搜出来看看深搜的思想:代码如下:View Code #include<stdio.h>#include<string.h>int map[10][10];int flag[10][10];int dir[4][2]={0,1,1,0,0,-1,-1,0};int ans;int N;int number;void DFS(int x,int y,int num){ int i; int cur_x,cu 阅读全文
posted @ 2012-03-24 17:37 world_ding 阅读(153) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2057曾记得自己用最原始的想法写过一次,找了N久,没找到,想是没写对或者忘交了……再次接触时,发现有大牛曾这样做,让我感到鸭梨很大……代码如下:View Code #include<stdio.h>int main(){ __int64 a,b; while(scanf("%I64X%I64X",&a,&b)!=EOF) { printf(a+b<0?"-%I64X\n":"%I64X\n",a+b< 阅读全文
posted @ 2012-03-24 15:48 world_ding 阅读(1318) 评论(1) 推荐(0) 编辑