Skip to content

prerequisites

bradendubois edited this page Jun 9, 2021 · 6 revisions

Prerequisites?

ID: prerequisites

Difficulty: 1.9

CPU Time: 1 second

Memory: 1024 MB

Solution

For each case, read in all the classes taken, and while reading each respective list in, check each class to see if it was taken and increment a tally if it has been; after reading a list of classes, see if at least as many as required were taken. If not, flip some boolean flag indicated that the requirements are not met.

Clone this wiki locally