Back
Close
  • 42

Learning Opportunities

This puzzle can be solved using the following concepts. Practice using these concepts and improve your skills.

Statement

 Goal

You will get a representation of Wally and a Picture.

You must find Wally's position inside the picture. The top left corner of the picture is (x, y)=(0,0).

If Wally's representation contains spaces, the picture may contain others characters at these positions.

All non-space characters of Wally will be visible in the picture.

________________________________________
* ASCII ART representations of wally are from :
- https://ascii.co.uk/art/men
- https://asciiart.website/index.php?art=comics/dilbert
Input
Line 1 : 2 space-separated integers wallyWidth wallyHeight indicating Wally's size
wallyHeight next lines : Representation of Wally
Next Line : 2 space-separated integers pictureWidth pictureHeight indicating the picture size
pictureHeight next lines : Picture
Output
Line 1 :Two space-separated integers x and y indicating the top left corner of Wally in the picture
Constraints
0 < wallyWidth <= mapWidth < 100
0 < wallyHeight <= mapHeight < 100
PIcture and Wally representations are limitted to ascii chars
Example
Input
3 3
 O 
/|\
/ \
10 10
..........
.......O..
....../|\.
....../.\.
..........
..........
..........
..........
..........
..........
Output
6 1

A higher resolution is required to access the IDE

codingame x discord
Join the CodinGame community on Discord to chat about puzzle contributions, challenges, streams, blog articles - all that good stuff!
JOIN US ON DISCORD
Online Participants