上一页 1 2 3 4 5 6 ··· 8 下一页
摘要: #includeusing namespace std;int begin[9][9];bool check(int x,int y,int k){ for(int i=0;i>t; while(t--) { for(int i=0;i>begin[i][j]; ... 阅读全文
posted @ 2014-05-22 16:56 903SW-BAO 阅读(166) 评论(0) 推荐(0) 编辑
摘要: Sudoku is a very simple task. A square table with 9 rows and 9 columns is divided to 9 smaller squares 3x3 as shown on the Figure. In some of the cell... 阅读全文
posted @ 2014-05-22 16:55 903SW-BAO 阅读(342) 评论(0) 推荐(0) 编辑
摘要: A university network is composed of N computers. System administrators gathered information on the traffic between nodes, and carefully divided the ne... 阅读全文
posted @ 2014-05-22 16:48 903SW-BAO 阅读(254) 评论(0) 推荐(0) 编辑
摘要: 题意:给出两个容积分别为 a 和 b 的pot,按照以下三种操作方式,求出能否在一定步数后,使者两个pot的其中一个的水量为c。1.FILL(i):将ipot倒满水。2.DROP(i):将ipot倒空水。3.POUR(i,j):将ipot的水倒到jpot上,直至要么ipot为空,要么jpot为满。思... 阅读全文
posted @ 2014-05-22 16:45 903SW-BAO 阅读(348) 评论(0) 推荐(0) 编辑
摘要: 题目大意:已知两堆牌s1和s2的初始状态, 其牌数均为c,按给定规则能将他们相互交叉组合成一堆牌s12,再将s12的最底下的c块牌归为s1,最顶的c块牌归为s2,依此循环下去。现在输入s1和s2的初始状态 以及 预想的最终状态s12问s1 s2经过多少次洗牌之后,最终能达到状态s12,若永远不可能相... 阅读全文
posted @ 2014-05-22 16:00 903SW-BAO 阅读(226) 评论(0) 推荐(0) 编辑
摘要: 大致题意:给定两个四位素数a b,要求把a变换到b变换的过程要保证 每次变换出来的数都是一个 四位素数,而且当前这步的变换所得的素数 与 前一步得到的素数 只能有一个位不同,而且每步得到的素数都不能重复。求从a到b最少需要的变换次数。无法变换则输出Impossible解题思路:超级水题,40入口的B... 阅读全文
posted @ 2014-05-22 15:56 903SW-BAO 阅读(421) 评论(0) 推荐(0) 编辑
摘要: 大致题意:给定两个整数n和k通过 n+1或n-1 或n*2 这3种操作,使得n==k输出最少的操作次数注意的地方有二:1、 由于用于广搜的 队列数组 和 标记数组 相当大,如果定义这两个数组时把它们扔到局部去,编译是可以的,但肯定执行不了,提交就等RE吧= =大数组必须开为全局 。。。常识常识。。。... 阅读全文
posted @ 2014-05-22 15:54 903SW-BAO 阅读(461) 评论(0) 推荐(0) 编辑
摘要: 题意:给你一个h * w的迷宫,其中有一句话需要注意一下“Exactly one 'S' and one 'E' will be present in the maze, and they will always be located along one of the maze edges and ... 阅读全文
posted @ 2014-05-22 15:49 903SW-BAO 阅读(282) 评论(0) 推荐(0) 编辑
摘要: BackgroundThe knight is getting bored of seeing the same black and white squares again and again and has decided to make a journeyaround the world. Wh... 阅读全文
posted @ 2014-05-22 15:44 903SW-BAO 阅读(1040) 评论(0) 推荐(0) 编辑
摘要: 这道题有隐含这一信息,每输入一对关系,如果判定有结果,则可以忽略后面输入数据,即使后面输入数据能改变结果,也不用管。所以应该每输入一个关系就去更新当前的图,然后进行一趟拓扑排序。一旦产生结果,再对后面的数据处理下,就可以输出结果。所有可能的情况罗列:(独家经验原创,重中之重!可以说没有这些,这题就无... 阅读全文
posted @ 2014-05-22 15:25 903SW-BAO 阅读(188) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 ··· 8 下一页