与‘DP-状压DP’有关的日志

poj2686

maksyuki 发表于 oj 分类,标签:
0
poj2686

Traveling by Stagecoach

Once upon a time, there was a traveler.

He plans to travel using stagecoaches (horse wagons). His starting point and destination are fixed, but he cannot determine his route. Your job in this problem is to write a program >>继续阅读

bzoj1087

maksyuki 发表于 oj 分类,标签:
0
bzoj1087

1087: [SCOI2005]互不侵犯King

Description

在N×N的棋盘里面放K个国王,使他们互不攻击,共有多少种摆放方案。国王能攻击到它上下左右,以及左上左下右上右下八个方向上附近的各一个格子,共8个格子。

Input

只有一行,包含两个数N,K ( 1 <=N <=9, 0 <= K <= N * N) >>继续阅读