随笔分类 -  搜索

【解题报告】【HDOJ1010】【DFS矩阵地图】Tempter of the Bone
摘要:题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1010 1 #include<stdio.h> 2 #include<string.h> 3 #include<math.h> 4 int map[10][10]; 5 int n,m,t; 6 int si,sj,ei,ej; 7 int bx[4]={1,0,-1,0},by[4]={0,1,0,-1}; 8 int result; 9 void print();10 void read_operation(int i,int j,char c);11 voi 阅读全文

posted @ 2012-07-21 18:36 coding封神 阅读(121) 评论(0) 推荐(0)

【解题报告】【HDOJ1016】【DFS素数环】Prime Ring Problem
摘要:题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1016注意:行末没空格,每次测试数据都要多输出一行 1 #include<stdio.h> 2 #include<string.h> 3 int time;//计数器 4 int n;//数字规模 5 int ring[22];//记录环的内容 6 int record[22];//记录数字是否用过 7 int prime[40];//素数表 8 void init();//初始化函数 9 void makePrime();//用筛选法构造素数表10 void play(in 阅读全文

posted @ 2012-07-21 18:34 coding封神 阅读(124) 评论(0) 推荐(0)

导航