摘要: 题目描述 大家应该都会玩“锤子剪刀布”的游戏:现给出两人的交锋记录,请统计双方的胜、平、负次数,并且给出双方分别出什么手势的胜算最大。 输入描述: 输入第1行给出正整数N(<=105),即双方交锋的次数。随后N行,每行给出一次交锋的信息,即甲、乙双方同时给出的的手势。C代表“锤子”、J代表“剪刀”、 阅读全文
posted @ 2019-07-03 18:31 whocarethat 阅读(139) 评论(0) 推荐(0) 编辑
摘要: 令 P​i​​ 表示第 i 个素数。现任给两个正整数 M≤N≤10​4​​,请输出 P​M​​ 到 P​N​​ 的所有素数。 输入格式: 输入在一行中给出 M 和 N,其间以空格分隔。 输出格式: 输出从 P​M​​ 到 P​N​​ 的所有素数,每 10 个数字占 1 行,其间以空格分隔,但行末不得 阅读全文
posted @ 2019-07-03 12:55 whocarethat 阅读(244) 评论(0) 推荐(0) 编辑
摘要: Pass a year learning in Hangzhou, yifenfei arrival hometown Ningbo at finally. Leave Ningbo one year, yifenfei have many people to meet. Especially a 阅读全文
posted @ 2019-07-02 20:53 whocarethat 阅读(154) 评论(0) 推荐(0) 编辑
摘要: A common pastime for poker players at a poker table is to shuffle stacks of chips. Shuffling chips is performed by starting with two stacks of poker c 阅读全文
posted @ 2019-07-02 17:38 whocarethat 阅读(108) 评论(0) 推荐(0) 编辑
摘要: 一天Extense在森林里探险的时候不小心走入了一个迷宫,迷宫可以看成是由n * n的格点组成,每个格点只有2种状态,.和#,前者表示可以通行后者表示不能通行。同时当Extense处在某个格点时,他只能移动到东南西北(或者说上下左右)四个方向之一的相邻格点上,Extense想要从点A走到点B,问在不 阅读全文
posted @ 2019-07-02 11:09 whocarethat 阅读(163) 评论(0) 推荐(0) 编辑
摘要: Given a positive integer n, write a program to find out a nonzero multiple m of n whose decimal representation contains only the digits 0 and 1. You m 阅读全文
posted @ 2019-07-02 10:15 whocarethat 阅读(141) 评论(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-06-29 21:02 whocarethat 阅读(128) 评论(0) 推荐(0) 编辑
摘要: The GeoSurvComp geologic survey company is responsible for detecting underground oil deposits. GeoSurvComp works with one large rectangular region of 阅读全文
posted @ 2019-06-27 22:24 whocarethat 阅读(135) 评论(0) 推荐(0) 编辑
摘要: The ministers of the cabinet were quite upset by the message from the Chief of Security stating that they would all have to change the four-digit room 阅读全文
posted @ 2019-06-27 21:34 whocarethat 阅读(200) 评论(0) 推荐(0) 编辑
摘要: Description - 题目描述 你被困在一个3D地牢中且继续寻找最短路径逃生!地牢由立方体单位构成,立方体单位中有的会充满岩石。向上下前后左右移动一个单位需要一分钟。你不能向对角线的四个方向移动且迷宫四周环绕着许多岩石。 是否可以逃出地牢?如果可以,则需要多少时间? Input - 输入 输入 阅读全文
posted @ 2019-06-26 22:03 whocarethat 阅读(288) 评论(0) 推荐(0) 编辑