Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

note: use c++ ( im using dev c++ atm, so please help and dont use stream.io) thank you I'm sure you all know the game

note: use c++ ( im using dev c++ atm, so please help and dont use stream.io)
thank you image text in transcribed
image text in transcribed
I'm sure you all know the game PekMen right? In this case, you will help PekMen to calculate how much food can be eaten on the map. Don't worry, there will be no ghosts on the map. But you must remember that PekMen cannot penetrate a wall or be outside the map. Format Input The first line of the input contains T,whichisthenumberoftestcases,Inthenext line, the program will receive input in the form of two Integers H and W which indicate the height and wilth of the map that will be imputted later. Then the next input will receive a map with a predetermined size. The map will consist of walls (\#), food (*). and PekMen player (P). There will only be one Pekmen player (P) on the map. Format Output For each test case, output one line containing "Case \#X: " (without quotes) where X is the test case number (starting from 1) and then followed by the amount of food that PekMen can eat. Constraints - 1T5 - W60 - H50 Sample Output (standard output)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Expert Performance Indexing In SQL Server

Authors: Jason Strate, Grant Fritchey

2nd Edition

1484211189, 9781484211182

More Books

Students also viewed these Databases questions

Question

Explain the purposes of managing performance.

Answered: 1 week ago