#C24. Old Timer Joe's Objection Counter

    ID: 45711 Type: Default 1000ms 256MiB

Old Timer Joe's Objection Counter

Old Timer Joe's Objection Counter

You are given proposals from the Algorithm Rangers regarding implementing various algorithms. The proposals are organized into five categories in the following order: Sorting, Searching, Dynamic Programming, Greedy Algorithms, and Graph Algorithms.

For each proposal, Old Timer Joe expresses his skepticism by responding with a fixed objection message. The message for a proposal in a given category is formatted as:

$$ \text{ Alg-what? I don't trust these new-fangled ideas!}$$

where Category takes one of the values: "Sorting", "Searching", "Dynamic Programming", "Greedy Algorithms", or "Graph Algorithms".

After processing all proposals, the program must output all individual responses (one per line) followed by a final summary line indicating the total number of objections per category.

inputFormat

The input is read from standard input (stdin) and consists of 5 sections, one for each category in the following order: Sorting, Searching, Dynamic Programming, Greedy Algorithms, and Graph Algorithms. For each category:

  • The first line contains an integer n indicating the number of proposals.
  • The next n lines each contain a proposal string.

outputFormat

For each proposal, output a line with Old Timer Joe's response. Its format is:

$$ \text{ Alg-what? I don't trust these new-fangled ideas!}$$

After all individual responses, output one additional summary line in the following format:

X sorting objections, Y searching objections, Z dynamic programming objections, D greedy algorithms objections, and E graph algorithms objections.

All output should be written to standard output (stdout).

## sample
2
Let's implement a Sorting Algorithm!
Let's implement a Sorting Algorithm!
1
Let's implement a Searching Algorithm!
3
Let's implement a Dynamic Programming Algorithm!
Let's implement a Dynamic Programming Algorithm!
Let's implement a Dynamic Programming Algorithm!
1
Let's implement a Greedy Algorithm!
2
Let's implement a Graph Algorithm!
Let's implement a Graph Algorithm!
Sorting Alg-what? I don't trust these new-fangled ideas!

Sorting Alg-what? I don't trust these new-fangled ideas! Searching Alg-what? I don't trust these new-fangled ideas! Dynamic Programming Alg-what? I don't trust these new-fangled ideas! Dynamic Programming Alg-what? I don't trust these new-fangled ideas! Dynamic Programming Alg-what? I don't trust these new-fangled ideas! Greedy Algorithms Alg-what? I don't trust these new-fangled ideas! Graph Algorithms Alg-what? I don't trust these new-fangled ideas! Graph Algorithms Alg-what? I don't trust these new-fangled ideas! 2 sorting objections, 1 searching objections, 3 dynamic programming objections, 1 greedy algorithms objections, and 2 graph algorithms objections.

</p>