This page is still under construction.

Parts of this page are still being built. What you see may change.

Sounds fishy!

Interview

Time limit2sMemory limit512 MB

Summary
Read four depth readings and print Fish Rising, Fish Diving, Fish At Constant Depth, or No Fish based on their ordering.
Level

Easy1 of 10

Topics
Implementation, Array
Solved
No attempts yet

Problem

A fish-finder is a device anglers use to locate fish in a lake. When it finds a fish, it sounds an alarm. It relies on depth readings to decide whether to sound that alarm. The fish-finder decides a fish has swum past if:

  • four consecutive depth readings form a strictly increasing sequence (such as 3 4 7 9), which we call "Fish Rising", or
  • four consecutive depth readings form a strictly decreasing sequence (such as 9 6 5 2), which we call "Fish Diving", or
  • four consecutive depth readings are all identical, which we call "Constant Depth".

Every other reading is treated as random noise or debris, which we call "No Fish".

Read the sequence of depth readings and determine whether the alarm will sound.

Input

The input is four positive integers, the depth readings, one integer per line.

Output

Print exactly one of four results. If the readings are strictly increasing, print Fish Rising. If they are strictly decreasing, print Fish Diving. If they are all identical, print Fish At Constant Depth. Otherwise, print No Fish.

Examples4

  1. Example 1

    Input
    1
    10
    12
    13
    
    Expected output
    Fish Rising
    
  2. Example 2

    Input
    9
    6
    5
    2
    
    Expected output
    Fish Diving
    
  3. Example 3

    Input
    5
    5
    5
    5
    
    Expected output
    Fish At Constant Depth
    
  4. Example 4

    Input
    3
    3
    4
    2
    
    Expected output
    No Fish