ACM训练
文章平均质量分 84
ACM菜鸟进行时
这个作者很懒,什么都没留下…
展开
-
HDU 2553 N皇后问题
N皇后问题 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2553 在N*N的方格棋盘放置了N个皇后,使得它们不相互攻击(即任意2个皇后不允许处在同一排,同一列,也不允许处在与棋盘边框成45角的斜线上。 你的任务是,对于给定的N,求出有多少种合法的放置方法。 Input 共有若干行,每行一个正整数N≤10,表示棋盘和皇后的数量;如果N=0,表示结束。 Output 共有若干行,每行原创 2016-07-17 11:47:47 · 175 阅读 · 0 评论 -
POJ 3984 迷宫问题
迷宫问题 Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 15397 Accepted: 9144 Description 定义一个二维数组: int maze[5][5] = { 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0原创 2016-07-18 18:50:50 · 291 阅读 · 0 评论 -
hdu 1728 逃离迷宫
逃离迷宫 Problem Description 给定一个m × n (m行, n列)的迷宫,迷宫中有两个位置,gloria想从迷宫的一个位置走到另外一个位置,当然迷宫中有些地方是空地,gloria可以穿越,有些地方是障碍,她必须绕行,从迷宫的一个位置,只能走到与它相邻的4个位置中,当然在行走过程中,gloria不能走到迷宫外面去。令人头痛的是,gloria是个没什么方向感的人,因此,原创 2016-07-18 19:06:04 · 4410 阅读 · 1 评论 -
HDU 1258 Sum It Up
Sum It Up Problem Description Given a specified total t and a list of n integers, find all distinct sums using numbers from the list that add up to t. For example, if t=4, n=6, and the list is [4,原创 2016-07-18 19:43:06 · 193 阅读 · 0 评论 -
HDU 1010 Tempter of the Bone
Tempter of the Bone Problem Description The doggie found a bone in an ancient maze, which fascinated him a lot. However, when he picked it up, the maze began to shake, and the doggie could feel th原创 2016-07-18 20:12:03 · 177 阅读 · 0 评论 -
HDU 1548 A strange lift
A strange lift Problem Description There is a strange lift.The lift can stop can at every floor as you want, and there is a number Ki(0 <= Ki <= N) on every floor.The lift have just two buttons: u原创 2016-07-18 20:49:22 · 292 阅读 · 0 评论 -
POJ 2823 Sliding Window
Sliding Window Time Limit: 12000MS Memory Limit: 65536K Total Submissions: 53791 Accepted: 15431 Case Time Limit: 5000MS Description An array of size n ≤ 106 is原创 2016-07-29 15:25:21 · 267 阅读 · 0 评论 -
POJ_2082_Terrible Sets
POJ_2082_Terrible Sets 单调栈原创 2016-07-30 19:40:48 · 392 阅读 · 0 评论 -
POJ_2488: A Knight's Journey
题目链接:http://poj.org/problem?id=2488 POJ 2488 DFS原创 2016-07-16 11:03:09 · 310 阅读 · 0 评论