Description 现在小朋友们最喜欢的"喜羊羊与灰太狼",话说灰太狼抓羊不到,但抓兔子还是比较在行的, 而且现在的兔子还比较笨,它们只有两个窝,现在你做为狼王,面对下面这样一个网格的地形: 左上角点为(1,1),右下角点为(N,M)(上图中N=4,M=5).有以下三种类型的道路 1:(x,y)<==>(x+1,y) 2:(x,y)…
题目描述 在n个人中,某些人的银行账号之间可以互相转账。这些人之间转账的手续费各不相同。给定这些人之间转账时需要从转账金额里扣除百分之几的手续费,请问A最少需要多少钱使得转账后B收到100元。 ...
One of my friends is always drunk. So, sometimes I get a bit confused whether he is drunk or not. So, one day I was talking to him, about his drinks! He began to describe his …
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…
time limit per test: 0.25 sec. memory limit per test: 4096 KB There is a group of N (2<=N<=1000) people which are numbered 1 through N, and everyone of them has not less…
Time limit per test: 0.25 second(s) Memory limit: 4096 kilobytes In the city of Dingilville the traffic is arranged in an unusual way. There are junctions and roads connecting…
time limit per test: 0.25 sec. memory limit per test: 4096 KB Dominoes – game played with small, rectangular blocks of wood or other material, each identified by a number of d…
题目描述 Description 有一矩形区域的城市中建筑了若干建筑物,如果某两个单元格有一个点相联系,则它们属于同一座建筑物。现在想在这些建筑物之间搭建一些桥梁,其中桥梁只能沿着矩形的方格的边沿搭建,如下图城市1有5栋建筑物,可以搭建4座桥将建筑物联系起来。城市2有两座建筑物,但不能搭建桥梁将它们连接。城市3只有一座建筑物,城市4有3座建筑物,可…
Remmarguts' Date Time Limit: 4000MS Memory Limit: 65536K Total Submissions: 31439 Accepted: 8577 Description "Good man never makes girls wait or breaks an appointment!" said t…
Heavy Transportation Time Limit: 3000MS Memory Limit: 30000K Total Submissions: 38775 Accepted: 10197 Description Background Hugo Heavy is happy. After the breakdown of the Ca…