Pizza Pandamonium

A rectangular pizza has been divided into squares.  Having been covered in tasty-brand cheese and tomato sauce, some of the squares have had olives placed on them leaving other squares free. Write a program to find out how many ways anchovies can be placed onto the pizza assuming no square is allowed to contain both olives and anchovies and no row (or column) in the pizza is allowed to contain more than one anchovy. Taken from the 2012 Informatics Olympiad.  Click here to view all the competition tasks. © British Informatics Olympiad

Resources

About CDB 361 Articles
Self-Employed Software Developer, Spark, Property Management, Hobby Forestry, Ex-Teacher, Engineering - Wood, Metal, Electrics & Computers. Outdoors - Walk, Cycle, Kitesurf,

Be the first to comment

Leave a Reply

Your email address will not be published.


*


This site uses Akismet to reduce spam. Learn how your comment data is processed.