House Party(Lists/Arrays Advanced- Technology Fundamentals)

Здравейте!

Понеже се мъча сам да решавам задачите на упражненията без да гледам лекциите, има ли някой представа защо този код ми дава 87/100 в джъдж?

https://pastebin.com/zh228AEr

 

Условие:

Write a program that keeps track of the guests that are going to a house party. On the first input line you are going to receive how many commands you are going to have. On the next lines you are going to receive some of the following inputs:

  • “{name} is going!”
  • “{name} is not going!”

If you receive the first type of input, you have to add the person if he/she is not in the list. (If he/she is in the list print on the console: “{name} is already in the list!”). If you receive the second type of input, you have to remove the person if he/she is in the list. (if not print: “{name} is not in the list!”). At the end print all the guests.

Examples

Input

Output

4

Allie is going!

George is going!

John is not going!

George is not going!

 

John is not in the list!

Allie

5

Tom is going!

Annie is going!

Tom is going!

Garry is going!

Jerry is going!

Tom is already in the list!

Tom

Annie

Garry

Jerry