Curie’s Waterfall 

Input

Two integers representing the number of rows and columns of the
waterfall wall, followed by a series of waterfall elements, which ends
with an "end" string. Each element is represented by a different
character, followed by the position of the element, represented by a row
and a column. Each of the elements is defined as follows: - Font: the
character ’O’. - Rock: the character ’R’. - Wormhole: the character ’W’
(followed by 2 connected positions). - Black hole: the character ’B’. -
Magnet: the character ’M’ followed by its position, the type of magnet
(- for repulsion and + for attraction), the radius of the magnetic
field, and its power (both integer). All the given numbers are integers.

Output

A two-dimensional diagram of the waterfall, representing the path (or
paths) the radioactive fluid will follow, according to the input
configuration of Curie’s Waterfall. Each cell is represented by a
character, with an empty space represented by a dot (’.’), and the rest
of the characters as outlined in the instructions. The path of the fluid
should be represented by the character ’O’.

Problem information

Author: HP CodeWars

Generation: 2026-01-25T13:55:32.511Z

© Jutge.org, 2006–2026.
https://jutge.org
