搜索&&最短路
文章平均质量分 67
绿蚁.r
这个作者很懒,什么都没留下…
展开
-
Additive equations (ZOJ-1204)
We all understand that an integer set is a collection of distinct integers. Now the question is: given an integer set, can you find all its addtive equations? To explain what an additive equation is,原创 2018-02-01 11:38:41 · 306 阅读 · 0 评论 -
漫步校园(HDU-1248)
Problem DescriptionLL最近沉迷于AC不能自拔,每天寝室、机房两点一线。由于长时间坐在电脑边,缺乏运动。他决定充分利用每次从寝室到机房的时间,在校园里散散步。整个HDU校园呈方形布局,可划分为n*n个小方格,代表各个区域。例如LL居住的18号宿舍位于校园的西北角,即方格(1,1)代表的地方,而机房所在的第三实验楼处于东南端的(n,n)。因有多条路线可以选择,LL希望每次的原创 2018-02-06 16:11:15 · 333 阅读 · 0 评论 -
逃离迷宫(HDU-1728)
Problem Description 给定一个m × n (m行, n列)的迷宫,迷宫中有两个位置,gloria想从迷宫的一个位置走到另外一个位置,当然迷宫中有些地方是空地,gloria可以穿越,有些地方是障碍,她必须绕行,从迷宫的一个位置,只能走到与它相邻的4个位置中,当然在行走过程中,gloria不能走到迷宫外面去。令人头痛的是,gloria是个没什么方向感的人,因此,她在行走过程原创 2018-01-30 15:16:53 · 419 阅读 · 0 评论 -
牛客练习赛12
A-圆圆链接:https://www.nowcoder.net/acm/contest/68/A题目描述我们定义一个圆 C 为以原点 (0, 0) 为中心的单位圆(半径为 1 的圆)。给定在 C 圆周上相异的两点A, B。请问由 A 出发,沿着圆周走到 B,是顺时针走比较近,还是逆时针走比较近呢?C 的圆周上的所有点都可以用 (cos(t), sin(t)) 来表示,其中 t 的物理意义为角度。也...原创 2018-02-10 09:05:04 · 449 阅读 · 0 评论 -
Prime Ring Problem(HDU-1016)
Problem DescriptionA ring is compose of n circles as shown in diagram. Put natural number 1, 2, ..., n into each circle separately, and the sum of numbers in two adjacent circles should be a prime原创 2018-01-29 11:34:30 · 255 阅读 · 0 评论 -
N皇后问题(HDU-2553)
Problem Description在N*N的方格棋盘放置了N个皇后,使得它们不相互攻击(即任意2个皇后不允许处在同一排,同一列,也不允许处在与棋盘边框成45角的斜线上。你的任务是,对于给定的N,求出有多少种合法的放置方法。 Input共有若干行,每行一个正整数N≤10,表示棋盘和皇后的数量;如果N=0,表示结束。 Output原创 2018-01-29 11:04:27 · 413 阅读 · 0 评论 -
Sum It Up(HDU-1258)
Problem DescriptionGiven 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,3,2,2,1,1],原创 2018-02-02 13:34:45 · 215 阅读 · 0 评论 -
Lake Counting(POJ-2386)
DescriptionDue to recent rains, water has pooled in various places in Farmer John's field, which is represented by a rectangle of N x M (1 <= N <= 100; 1 <= M <= 100) squares. Each square contains原创 2018-02-02 10:28:45 · 933 阅读 · 0 评论 -
Rescue(HDU-1242)
Problem DescriptionAngel was caught by the MOLIGPY! He was put in prison by Moligpy. The prison is described as a N * M (N, M Angel's friends want to save Angel. Their task is: approach Angel.原创 2018-02-02 09:16:26 · 502 阅读 · 0 评论 -
Wormholes(POJ-3259)
While exploring his many farms, Farmer John has discovered a number of amazing wormholes. A wormhole is very peculiar because it is a one-way path that delivers you to its destination at a time that i原创 2018-02-07 10:43:37 · 437 阅读 · 0 评论