1002 - Country Roads I am going to my home. There are many cities and many bi-directional roads between them. The cities are numbered from 0 to n-1 and each road has a cost. There are m roads. You are given the number of my city t where I belong. Now…
I am going to my home. There are many cities and many bi-directional roads between them. The cities are numbered from 0 to n-1 and each road has a cost. There are m roads. You are given the number of my city t where I belong. Now from each city you h…
http://www.lightoj.com/volume_showproblem.php?problem=1027 You are in a maze; seeing n doors in front of you in beginning. You can choose any door you like. The probability for choosing a door is equal for all doors. If you choose the ith door, it ca…
时间限制:1 秒 内存限制:32 兆 特殊判题:否 提交:832 解决:555 题目描述: The Head Elder of the tropical island of Lagrishan has a problem. A burst of foreign aid money was spent on extra roads between villages some years ago. But the jungle overtakes roads relentlessly, so the…
http://www.lightoj.com/volume_showproblem.php?problem=1018 Mubashwir returned home from the contest and got angry after seeing his room dusty. Who likes to see a dusty room after a brain storming programming contest? After checking a bit he found a…
http://www.lightoj.com/volume_showproblem.php?problem=1005 PDF (English) Statistics Forum Time Limit: 1 second(s) Memory Limit: 32 MB A rook is a piece used in the game of chess which is played on a board of square grids. A rook can only move…
题目链接:http://lightoj.com/volume_showproblem.php?problem=1306 You have to find the number of solutions of the following equation: Ax + By + C = Where A, B, C, x, y are integers and x1 ≤ x ≤ x2 and y1 ≤ y ≤ y2. Input Input starts with an integer T (≤ ),…
题目链接:http://lightoj.com/volume_showproblem.php?problem=1319 In 'MonkeyLand', there is a traditional game called "Bamboo Climbing". The rules of the game are as follows: ) There are N monkeys who play this game and there are N bamboos of equal he…
题目链接: http://lightoj.com/volume_showproblem.php?problem=1024 In a strange planet there are n races. They are completely different as well as their food habits. Each race has a food-eating period. That means the ith race eats after every xi de-sec (de…