Curling 2.0
The input is a sequence of datasets. The end of the input is indicated by a line containing two zeros separated by a space. The number of datasets never exceeds 100. Each dataset is formatted as follows. the width(=w) and the height(=h) of
The input is a sequence of datasets. The end of the input is indicated by a line containing two zeros separated by a space. The number of datasets never exceeds 100.
Each dataset is formatted as follows.
the width(=w) and the height(=h) of the board
First row of the board
...
h-th row of the board
The width and the height of the board satisfy: 2 w h
Each line consists of w decimal numbers delimited by a space. The number describes the status of the corresponding square.
0 vacant square 1 block 2 start position 3 goal position
The dataset for Fig. D-1 is as follows:
6 6
1 0 0 2 1 0
1 1 0 0 0 0
0 0 0 0 0 3
0 0 0 0 0 0
1 0 0 0 0 1
0 1 1 1 1 1
推荐阅读
-
Hotspot 2.0是什么?什么是Hotspot 2.0
-
在ASP.NET 2.0中操作数据之五十七:在分层架构中缓存数据
-
在ASP.NET 2.0中操作数据之六十四:GridView批量添加数据
-
在ASP.NET 2.0中操作数据之六十二:GridView批量更新数据
-
在ASP.NET 2.0中操作数据之六十一:在事务里对数据库修改进行封装
-
在ASP.NET 2.0中操作数据之六十九:处理Computed Columns列
-
在ASP.NET 2.0中操作数据之六十七:在TableAdapters中使用JOINs
-
在ASP.NET 2.0中操作数据之六十:创建一个自定义的Database-Driven Site Map Provider
-
在ASP.NET 2.0中操作数据之六十六:在TableAdapters中使用现有的存储过程
-
基于Springboot2.0构建ES的多客户端