logo AlgoBeat OnlineJudge
登录 注册

#215538. [CCC 2016 J1] Tournament Selection

内存限制:512 MiB 时间限制:1000 ms 标准输入输出
题目类型:VJudge(洛谷) 评测方式:VJudge
上传者: 匿名

题目描述

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 or games, they are placed in Group ;

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

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

  • 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 (to indicate which Group the player should be placed in) or (to indicate the player has been eliminated).

样例

样例输入 1

W
L
W
W
L
W

样例输出 1

2

样例输入 2

L
L
L
L
L
L

样例输出 2

-1