#K2886. Review Sentiment Analysis

    ID: 24836 Type: Default 1000ms 256MiB

Review Sentiment Analysis

Review Sentiment Analysis

You are given a review content which consists of three parts: an identifier, a title, and the main review text (which may span several lines). Your task is to analyze the review text (i.e., all lines from the third line onward) to determine its sentiment.

The sentiment is determined by the occurrence of certain keywords:

  • Positive: loved, amazing, superb, highly recommend
  • Negative: boring, terrible, worst, not worth
  • Neutral: fine, okay, average, nothing extraordinary

If the number of positive keywords is strictly greater than both negative and neutral counts, output 1. If the number of negative keywords is strictly greater than both positive and neutral counts, output 2. In all other cases, output 3.

inputFormat

The input is provided via standard input (stdin) and consists of multiple lines. The first line is a review identifier, the second line is the review title, and the remaining lines form the review text.

outputFormat

Print a single integer to standard output (stdout), representing the sentiment of the review: 1 for positive, 2 for negative, and 3 for neutral.

## sample
45
Amazing Experience
I loved the plot and the acting was superb. Highly recommend this movie to everyone!
1