随笔分类 - 搜索
摘要:6 6..X...XXX.X.....X.X.....X.....X.X...3 5 6 3如上一个图 告诉起点和终点 X到达不费力气 .到达花费1 问从起点到终点 最少的花费力气分析:bfs 遇到X在bfs代码: 1 #include 2 #include 3 #include 4 #in...
阅读全文
摘要:大意:给一个矩阵 有一个六秒之内会爆炸的炸弹 爆炸事件在数值为4的位置会重置为60: The area is a wall, Ignatius should not walk on it.1: The area contains nothing, Ignatius can walk on it.2...
阅读全文
摘要:大意:有两个杯子 三种操作You are given two pots, having the volume ofAandBliters respectively. The following operations can be performed:FILL(i) fill the poti(1 ≤...
阅读全文
摘要:大意:在一个给定形状的棋盘(形状可能是不规则的)上面摆放棋子,棋子没有区别。要求摆放时任意的两个棋子不能放在棋盘中的同一行或者同一列,请编程求解对于给定形状和大小的棋盘,摆放k个棋子的所有可行的摆放方案C。输入含有多组测试数据。每组数据的第一行是两个正整数,n k,用一个空格隔开,表示了将在一个n*...
阅读全文
摘要:DescriptionAfter escaping from Figo's chase, Severus falls into a N * M maze designed by Figo.At first, Severus is located on the grid S. Every second he can only move to the four grids that adjacent to the grid he islocated on. The moment he move to any side of the maze, he will get rid of Figo
阅读全文

浙公网安备 33010602011771号