Pro.ID21025 TitleT-Shirt Gumbo Title链接http://10.20.2.8/oj/exercise/problem?problem_id=21025 AC0 Submit335 Ratio0.00% 时间&空间限制描述Boudreaux and Thibodeaux are student volunteers for this year's ACM South Central Region's programming contest. One of their duties is to distribute the contest T-shirts to arriving teams. The T-shirts had to be ordered in advance using an educated guess as to how many shirts of each size should be needed. Now it falls to Boudreaux and Thibodeaux to determine if they can hand out T-shirts to all the contestants in a way that makes everyone happy. 输入Input to this problem will consist of a (non-empty) series of up to 100 data sets. Each data set will be formatted according to the following description, and there will be no blank lines separating data sets. A single data set has 4 components:
After the last data set, there will be a single line: ENDOFINPUT 输出Description Boudreaux and Thibodeaux are student volunteers for this year's ACM South Central Region's programming contest. One of their duties is to distribute the contest T-shirts to arriving teams. The T-shirts had to be ordered in advance using an educated guess as to how many shirts of each size should be needed. Now it falls to Boudreaux and Thibodeaux to determine if they can hand out T-shirts to all the contestants in a way that makes everyone happy. Input Input to this problem will consist of a (non-empty) series of up to 100 data sets. Each data set will be formatted according to the following description, and there will be no blank lines separating data sets. A single data set has 4 components:
After the last data set, there will be a single line: ENDOFINPUT Output For each data set, there will be exactly one line of output. This line will reflect the attitude of the contestants after the T-shirts are distributed. If all the contestants were satisfied, output: T-shirts rock! Otherwise, output: I'd rather not wear a shirt anyway... Sample Input START 1
ST
0 0 1 0 0
END
START 2
SS TT
0 0 1 0 0
END
START 4
SM ML LX XT
0 1 1 1 0
END
ENDOFINPUT Sample Output T-shirts rock!
I'd rather not wear a shirt anyway...
I'd rather not wear a shirt anyway... Source 样例输入START 1
ST
0 0 1 0 0
END
START 2
SS TT
0 0 1 0 0
END
START 4
SM ML LX XT
0 1 1 1 0
END
ENDOFINPUT 样例输出T-shirts rock!
I'd rather not wear a shirt anyway...
I'd rather not wear a shirt anyway... 作者 |