Hide

Problem E
Less vs. Fewer

/problems/lessvsfewer/file/statement/en/img-0001.jpg
Image by Edvard Munch (Wikimedia Commons); CC BY-SA 3.0

Grammarians of the worlds, unite! There is a blight on the English language in the form of commonly used phrases like “less days” (horrors!), which should actually be “fewer days” (music to the ears), or “amount of people” (gasp!), which should be “number of people” (all is right with the world again). Your help is required to correct those who clearly need to be corrected.

The confusion over the proper use of “less”, “fewer”, “number of”, etc., can be cleared up by understanding the distinction between count nouns and mass nouns. A count noun refers to something that can be counted and can be in singular or plural form (“one cat, two cats”), whereas a mass noun refers to something that cannot be counted and does not have a plural form (like “water” or “love”).1

The following table lists some common phrases that can be formed with these types of nouns, where <c> denotes a count noun, <m> denotes a mass noun, and <c  or  m> denotes either a count noun or a mass noun (i.e., such a phrase can be used with either type of noun). If a phrase can only be used with one type of noun, then using that phrase with the other type of noun is, of course, glaringly wrong.

Phrase

Example(s)

number of <c>

number of days

amount of <m>

amount of water

most <c  or  m>

most trophies

 

most enthusiasm

fewest <c>

fewest barriers

least <m>

least resistance

more <c  or  m>

more artichokes

 

more happiness

fewer <c>

fewer zombies

less <m>

less fear

many <c>

many cats

much <m>

much work

few <c>

few mice

little <m>

little sleep

Table 1: Common English phrases and their accompanying noun types

Given a list of nouns and their types, followed by a list of phrases from Table 1 that incorporate these nouns, determine whether each such phrase is correct or incorrect.

Input

The first line of input contains two space-separated integers, $n$ and $p$, where $n$ is the number of nouns $(1 \leq n \leq 1\, 000)$ and $p$ is the number of phrases $(1 \leq p \leq 2\, 500)$. This is followed by $n$ lines, each of which contains a noun (a string of characters from az with length between $1$ and $20$, inclusive), followed by a space, followed by a single character, either ‘c’ (denoting count noun) or ‘m’ (denoting mass noun). All $n$ nouns are distinct. This is then followed by $p$ lines, each of which contains a phrase from Table 1, with the element in angle brackets replaced by one of the $n$ nouns.

Output

For each of the $p$ phrases in the input, print a single line containing either “Correct!” if the phrase contains the right type of noun, or “Not on my watch!” if the phrase contains the wrong type of noun. (Note that technically any phrase that can incorporate a count noun requires that noun to be in plural form, but you don’t have to worry about singular/plural here. You can assume that any of the $n$ nouns that is a count noun can be used as given in any phrase that is able to incorporate a count noun.)

Sample Input 1 Sample Output 1
4 5
people c
love m
water m
cats c
less people
fewer people
more cats
number of love
much water
Not on my watch!
Correct!
Correct!
Not on my watch!
Correct!

Footnotes

  1. As with many things in English, and in most (all?) natural languages, there are some exceptions, but these are not relevant to this problem. And for those who are thinking about counting water, “water” is a mass noun, but “molecule(s) of water” is a count noun (actually, a noun phrase).

Please log in to submit a solution to this problem

Log in