随笔分类 - 数据结构:BFS
摘要:Vitaly works at the warehouse. The warehouse can be represented as a grid of n × m cells, each of which either is free or is occupied by a container.
阅读全文
摘要:给定一个自然数N,找出一个M,使得M > 0且M是N的倍数,并且M的10进制表示只包含0或1。求最小的M。 例如:N = 4,M = 100。 Input Output Input示例 Output示例
阅读全文
摘要:链接:https://www.nowcoder.com/acm/contest/105/F来源:牛客网 有q个单向传送阵,每个传送阵各有一个入口和一个出口,入口和出口都在迷宫的格子里,当走到或被传送到一个有传送阵入口的格子时,小明可以选择是否开启传送阵。如果开启传送阵,小明就会被传送到出口对应的格子
阅读全文
摘要:1001 小C的倍数问题 Accepts: 1990 Submissions: 4931 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) 1001 小C的倍数问题 Accepts: 19
阅读全文
摘要:Description 在一个8行9列的国际象棋棋盘上,有一名骑士在追杀对方的国王。该骑士每秒跨越一个2*3的区域,如下图所示。 而对方的国王慌忙落逃,他先沿着右下斜线方向一直跑,遇到边界以后会沿着光线反射方向继续跑(遇到死角则原路返回),他每秒只跑一格。 给出骑士和国王的初始位置,求最快在多少秒的
阅读全文
摘要:C - Cat Snuke and a Voyage Time limit : 2sec / Memory limit : 256MB Score : 300 points Problem Statement In Takahashi Kingdom, there is an archipelago
阅读全文
摘要:D - Fennec VS. Snuke Time limit : 2sec / Memory limit : 256MB Score : 400 points Problem Statement Fennec and Snuke are playing a board game. On the b
阅读全文
摘要:Red and Black Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 20353 Accepted Submission(s): 12404
阅读全文
摘要:逃离迷宫 Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 27173 Accepted Submission(s): 6622 Problem D
阅读全文
摘要:Ignatius被魔王抓走了,有一天魔王出差去了,这可是Ignatius逃亡的好机会. 魔王住在一个城堡里,城堡是一个A*B*C的立方体,可以被表示成A个B*C的矩阵,刚开始Ignatius被关在(0,0,0)的位置,离开城堡的门在(A-1,B-1,C-1)的位置,现在知道魔王将在T分钟后回到城堡,
阅读全文
摘要:Catch That Cow Farmer John has been informed of the location of a fugitive cow and wants to catch her immediately. He starts at a point N (0 ≤ N ≤ 100
阅读全文

浙公网安备 33010602011771号