【题目】洛谷10月月赛R1 提高组 【题意】给定n*n棋盘和<=16个棋子,给几个棋子种类和攻击范围,现我方只有一马,求能否吃王。 【算法】状压+BFS 【题解】16种棋子中,马不能吃马,直接处理马和王,那么就剩13个棋子,可以压成2^13表示棋盘现有棋子存活状态。 然后对vis[2^13][n][ ...
分类:
其他好文 时间:
2017-10-08 19:00:33
阅读次数:
115
题目背景 毒奶色和F91是好朋友。 题目描述 他们经常在一起玩一个游戏,不,不是星际争霸,是国际象棋。 毒奶色觉得F91是一只鸡。他在一个n×n的棋盘上用黑色的城堡(车)、骑士(马)、主教(象)、皇后(副)、国王(帅)、士兵(卒)摆了一个阵。 然而F91觉得毒奶色是一只鸡。他发起了挑战:他要操纵一个 ...
分类:
其他好文 时间:
2017-10-07 23:33:20
阅读次数:
240
原题链接在这里:https://leetcode.com/problems/knight-probability-in-chessboard/description/ 题目: On an NxN chessboard, a knight starts at the r-th row and c-th ...
分类:
其他好文 时间:
2017-10-07 12:32:02
阅读次数:
205
Codeforces Round #436 (Div. 2) C. Bus A bus moves along the coordinate line Ox from the point x?=?0 to the point x?=?a. After starting from the point ...
分类:
其他好文 时间:
2017-09-29 22:55:33
阅读次数:
202
Description A bus moves along the coordinate line Ox from the point x?=?0 to the point x?=?a. After starting from the point x?=?0, it reaches the poin ...
分类:
其他好文 时间:
2017-09-29 12:46:15
阅读次数:
227
Given a non-empty integer array of size n, find the minimum number of moves required to make all array elements equal, where a move is incrementing n ... ...
分类:
其他好文 时间:
2017-09-26 21:21:04
阅读次数:
171
657. Judge Route Circle【easy】 Initially, there is a Robot at position (0, 0). Given a sequence of its moves, judge if this robot makes a circle, which ...
分类:
其他好文 时间:
2017-09-23 20:21:19
阅读次数:
130
1939 Q1 Detective Dark Knight Gotham Robin Human Detective Dark Knight Gotham Robin Human Q2 Q1 Q2 <html><head><title>1939</title></head><body><h1>Q1< ...
分类:
其他好文 时间:
2017-09-20 21:57:25
阅读次数:
119
Initially, there is a Robot at position (0, 0). Given a sequence of its moves, judge if this robot makes a circle, which means it moves back to the or ...
分类:
其他好文 时间:
2017-09-13 14:03:26
阅读次数:
94
Given a non-empty integer array of size n, find the minimum number of moves required to make all array elements equal, where a move is incrementing n ...
分类:
其他好文 时间:
2017-09-08 18:08:09
阅读次数:
133