Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
Language: Finding Nemo
Description Boudreaux and Thibodeaux are just returning from watching Finding Nemo and are finding themselves pretty hungry after watching all those fish swim around for a couple of hours. Like the true Cajuns that they are, they jump into their pickup and head on over to the local bayou. Upon arriving Boudreaux realizes that in their mad hunger rush, they have completely forgotten their fishing poles and tackle. Boudreaux yells out to Thibodeaux, "Hey couyon, you forgot about dem poles!" and Thibodeaux replies "Don't worry, I got me some fish sticks out in the truck." Boudreaux later finds out that "fish sticks" are really dynamite, to which he replies "Mais fool, now how you suppose we gonna know where to place dem sticks to catch some fish?" at which point Thibodeaux then breaks out his fish finder and laptop and whips up a program that will tell them just that.
Given the position of all the fish in the bayou and the spot Boudreaux and Thibodeaux want to drop their dynamite (after lighting the fuses of course), you are to write a program that will tell how many fish they will kill, ahem, I mean catch. Each dynamite stick has a certain fuse length that determines at which depth it will blow up. Any fish within a one unit radius of the dynamite when it blows up is as good as fish fried. Keep in mind that the fish never move from their location, and the dynamite sticks fall straight to the bottom of the bayou. Input Input to this problem will consist of a (non-empty) series of up to 100 data sets. Each data set will be formatted according to the following description, and there will be no blank lines separating data sets.
A single data set has 4 components:
After the last data set, there will be a single line: ENDOFINPUT Note: All numeric values will be given as integers. The dynamite drops at a constant speed from the top of the bayou (z = 0). The fuse burns up one unit of its length in precisely the amount of time it takes the dynamite to sink one unit deeper into the bayou. If the dynamite reaches the bottom of the bayou before the fuse runs out, it will stay there until it detonates. Multiple fish will not occupy the same position. Fish are killed if their distance from any dynamite explosion is <= 1. Output For each data set, there will be exactly one line of output. The output will be a phrase stating how much fish Boudreaux and Thibodeaux will be frying up tonight.
If they blow up at least one fish, the following phrase will be printed: AIEE, I got N fish, me! where N is the number of fish blown up. If they don't blow up any fish, the following phrase will be printed: None of dem fish blowed up! Sample Input START 5 5 5 1,1,1 2,2,2 3,3,3 4,3,0 4,4,4 3,0,2 2,1,3 3,3,3 END START 2 3 4 1,1,10 1,1,1 0,2,2 0,0,1 END ENDOFINPUT Sample Output AIEE, I got 1 fish, me! None of dem fish blowed up! Source |
[Submit] [Go Back] [Status] [Discuss]
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator