摘要: Little Tom loves playing games. One day he downloads a little computer game called 'Bloxorz' which makes him excited. It's a game about rolling a box 阅读全文
posted @ 2019-01-30 14:22 EchoZQN 阅读(152) 评论(0) 推荐(0) 编辑
摘要: Background The knight is getting bored of seeing the same black and white squares again and again and has decided to make a journey around the world. 阅读全文
posted @ 2019-01-25 22:18 EchoZQN 阅读(138) 评论(0) 推荐(0) 编辑
摘要: 定义一个二维数组: int maze[5][5] = { 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 0, }; 它表示一个迷宫,其中的1表示墙壁,0表示可以走的路,只能横着走或竖着走,不能斜着走,要 阅读全文
posted @ 2019-01-25 22:12 EchoZQN 阅读(135) 评论(0) 推荐(0) 编辑
摘要: 链接:https://ac.nowcoder.com/acm/problem/16601?&headNav=acm来源:牛客网 经过11年的韬光养晦,某国研发出了一种新的导弹拦截系统,凡是与它的距离不超过其工作半径的导弹都能够被它成功拦截。当工作半径为0时,则能够拦截与它位置恰好相同的导弹。但该导弹 阅读全文
posted @ 2019-01-20 21:56 EchoZQN 阅读(252) 评论(0) 推荐(0) 编辑
摘要: T. Chur teaches various groups of students at university U. Every U-student has a unique Student Identification Number (SIN). A SIN s is an integer in 阅读全文
posted @ 2019-01-19 10:24 EchoZQN 阅读(135) 评论(0) 推荐(0) 编辑
摘要: The modular modular multiplicative inverse of an integer a modulo m is an integer x such that a-1≡x (mod m). This is equivalent to ax≡1 (mod m). Input 阅读全文
posted @ 2019-01-19 10:02 EchoZQN 阅读(145) 评论(0) 推荐(0) 编辑
摘要: 题目:The Tower of Babylon 这是一个DAG 模型,有两种常规解法 1.记忆化搜索, 写函数,去查找上一个符合的值,不断递归 2.递推法 阅读全文
posted @ 2019-01-07 15:36 EchoZQN 阅读(195) 评论(0) 推荐(0) 编辑
摘要: 题目:UVA 103 stacking boxes 题目大意: 给你两个数,一个是盒子的个数,一个是每一个盒子的维数。将一个个盒子互相装起来,让你求最多可以装多少个,要求字典序最小。 解析:这个就是盒子的嵌套,和二维盒子嵌套有点像,只是建图的方法不一样,二维只要判断两个,长和宽即可,而k维需要判断k 阅读全文
posted @ 2019-01-05 15:44 EchoZQN 阅读(150) 评论(0) 推荐(0) 编辑
摘要: Peter has a sequence a1,a2,...,ana1,a2,...,an and he define a function on the sequence -- F(a1,a2,...,an)=(f1,f2,...,fn)F(a1,a2,...,an)=(f1,f2,...,fn) 阅读全文
posted @ 2019-01-02 16:35 EchoZQN 阅读(80) 评论(0) 推荐(0) 编辑
摘要: Keeping track of all the cows can be a tricky task so Farmer John has installed a system to automate it. He has installed on each cow an electronic ID 阅读全文
posted @ 2018-12-28 19:08 EchoZQN 阅读(150) 评论(0) 推荐(0) 编辑