摘要: 题目描述 司令部的将军们打算在NM的网格地图上部署他们的炮兵部队。一个NM的地图由N行M列组成,地图的每一格可能是山地(用“H” 表示),也可能是平原(用“P”表示),如下图。在每一格平原地形上最多可以布置一支炮兵部队(山地上不能够部署炮兵部队);一支炮兵部队在地图上的攻击范围如图中黑色区域所示: 阅读全文
posted @ 2019-11-10 15:40 Anticlock 阅读(201) 评论(0) 推荐(0) 编辑
摘要: 题目描述 Farmer John has purchased a lush new rectangular pasture composed of M by N (1 ≤ M ≤ 12; 1 ≤ N ≤ 12) square parcels. He wants to grow some yummy 阅读全文
posted @ 2019-11-10 14:48 Anticlock 阅读(278) 评论(0) 推荐(0) 编辑
摘要: 状压dp练习 题目描述 在N×N的棋盘里面放K个国王,使他们互不攻击,共有多少种摆放方案。国王能攻击到它上下左右,以及左上左下右上右下八个方向上附近的各一个格子,共8个格子。 注:数据有加强(2018/4/25) 输入格式 只有一行,包含两个数N,K ( 1 ⇐N ⇐9, 0 ⇐ K ⇐ N * N 阅读全文
posted @ 2019-11-10 14:12 Anticlock 阅读(199) 评论(0) 推荐(0) 编辑
摘要: Before ACM can do anything, a budget must be prepared and the necessary financial support obtained. The main income for this action comes from Irrever 阅读全文
posted @ 2019-11-10 13:31 Anticlock 阅读(138) 评论(0) 推荐(0) 编辑
摘要: A group of researchers are designing an experiment to test the IQ of a monkey. They will hang a banana at the roof of a building, and at the mean time 阅读全文
posted @ 2019-11-10 13:07 Anticlock 阅读(206) 评论(0) 推荐(0) 编辑