#7846. [CCC 2016 J1] Tournament Selection

[CCC 2016 J1] Tournament Selection

[CCC 2016 J1] Tournament Selection

题目描述

Each player in a tournament plays six games. There are no ties. The tournament director places the players in groups based on the results of games as follows:
  • if a player wins 55 or 66 games, they are placed in Group 11;

  • if a player wins 33 or 44 games, they are placed in Group 22;

  • if a player wins 11 or 22 games, they are placed in Group 33;

  • if a player does not win any games, they are eliminated from the tournament.

Write a program to determine which group a player is placed in.

输入格式

The input consists of six lines, each with one of two possible letters: `W` (to indicate a win) or `L` (to indicate a loss).

输出格式

The output will be either $1, 2, 3$ (to indicate which Group the player should be placed in) or $-1$ (to indicate the player has been eliminated).
W
L
W
W
L
W
2
L
L
L
L
L
L
-1

提示

(暂无提示) 标签: P15518|2016|CCC(加拿大)|分类讨论

来源

P15518|[CCC 2016 J1] Tournament Selection