avatar
fireworks99
keep hungry keep foolish
POJ 1797 Heavy Transportation

Description

n个点,m个关于边的叙述(边的权值代表路的最大承载量)

求从1到n,路上的最大承载量

Read more -->
POJ 3268 Silver Cow Party

Description

有n个农场(1~N),给出M条单向路描述。每个农场派出一头牛去某个农场(X)参加聚会,聚会结束后要返回,当然它们来回都选择最短路(因为路是单向的,来回可能路径不同),问这n头牛中,来回所走路程最长的那头,它走的总路程是多少?

Read more -->
POJ 2253 Frogger

Description

Freddy Frog is sitting on a stone in the middle of a lake. Suddenly he notices Fiona Frog who is sitting on another stone. He plans to visit her, but since the water is dirty and full of tourists’ sunscreen, he wants to avoid swimming and instead reach her by jumping.

Read more -->
HDU 1425 sort

Description

给你n个整数,请按从大到小的顺序输出其中前m大的数。

Read more -->
输入输出挂

关于输入挂

输入速度:getchar > scanf > cin

特点:快糙猛?

Read more -->
POJ 3126 Prime Path

Description

给出两个素数,求从这个变到那个需要几步。(变法:每步仅改变一位数)

题目链接 http://poj.org/problem?id=3126

Read more -->
FZU 2150 Fire Game

Description

今有草地一片,’#’为草,’.’为空地,草可燃,地不可。有二童子顽劣之至,以焚尽草地为娱。二人可于两处分别点火,瞬间即燃。火势凶猛,所到之处,寸草不生。凡火所在,唯待一刻,便四处蔓延。问:待草烧尽,耗时几何?

Read more -->
HDU 2612 Find a way

Description

Pass a year learning in Hangzhou, yifenfei arrival hometown Ningbo at finally. Leave Ningbo one year, yifenfei have many people to meet. Especially a good friend Merceki. Yifenfei’s home is at the countryside, but Merceki’s home is in the center of city. So yifenfei made arrangements with Merceki to meet at a KFC. There are many KFC in Ningbo, they want to choose one that let the total time to it be most smallest. Now give you a Ningbo map, Both yifenfei and Merceki can move up, down ,left, right to the adjacent road by cost 11 minutes.

Read more -->
BFS路径输出

记录路径

pre存当前点的前一个点的位置标号(序号),类似的还有最长递增子序列的路径记录,还有链式前向星,都是一个方法。

Read more -->
uva 11624 Fire!

题意

帮助J走出一个大火蔓延的迷宫。J每分钟可以超上下左右四个方向移动,而所有着火的格子每一分钟都会往四个方向蔓延一格。迷宫中有一些障碍,J和火都无法进入。当J走出迷宫的边界时,逃离成功。

Read more -->
Site by Baole Zhao | Powered by Hexo | theme PreciousJoy