📄 problem 1755.htm
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- saved from url=(0047)http://acm.zju.edu.cn/show_problem.php?pid=1755 -->
<HTML><HEAD><TITLE>Problem 1755</TITLE>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<META content="MSHTML 6.00.2900.3132" name=GENERATOR></HEAD>
<BODY>
<CENTER><IMG src="Problem 1755.files/logo.gif" align=center></IMG></CENTER>
<HR>
<CENTER><FONT color=blue size=+2>Clay Bully</FONT></CENTER>
<HR>
<CENTER><FONT color=green>Time limit:</FONT> 1 Seconds <FONT
color=green>Memory limit: </FONT>32768K </FONT><BR><FONT
color=green>Total Submit:</FONT> 2510 <FONT color=green>Accepted
Submit:</FONT> 1311 </CENTER>
<HR>
Ms. Terry is a pre-school art teacher who likes to have her students work with
clay. One of her assignments is to form a lump of clay into a block and then
measure the dimensions of the block. However, in every class, there is always
one child who insists on taking some clay from some other child. Since Ms. Terry
always gives every child in a class the same amount of clay to begin with, you
can write a program that helps Ms. Terry find the bully and victim after she
measures each child's finished block.
<P><BR><B>Input</B></P>
<P>There are one or more classes of students, followed by a final line
containing only the value -1. Each class starts with a line containing an
integer, n, which is the number of students in the class, followed by n lines of
student information. Each line of student information consists of three positive
integers, representing the dimensions of the clay block, followed by the
student's first name. There can never be more than 9 students nor less than 2
students in any class. Each student's name is at most 8 characters. Ms. Terry
always gives each student at most 250 cubic units of clay. There is exactly one
bully and one victim in each class. </P>
<P><BR><B>Output </B></P>
<P>For each class print a single line exactly as shown in the sample output.</P>
<P><BR><B>Sample Input</B></P>
<P>3<BR>10 10 2 Jill<BR>5 3 10 Will<BR>5 5 10 Bill<BR>4<BR>2 4 10 Cam<BR>4 3 7
Sam<BR>8 11 1 Graham<BR>6 2 7 Pam<BR>-1</P>
<P><BR><B>Sample Output</B></P>
<P>Bill took clay from Will.<BR>Graham took clay from Cam.<BR></P>
<HR>
<FONT color=green size=+1>Problem Source: </FONT><I>Mid-Central USA 2003</I>
<HR>
<CENTER><A href="http://acm.zju.edu.cn/submit.php?pid=1755">Submit</A>
<A href="http://acm.zju.edu.cn/list_problem.php?vol=8">Back</A>
<A
href="http://acm.zju.edu.cn/problem_status.php?pid=1755">Status</A> </CENTER>
<HR>
<CENTER>
<TABLE width="100%" border=0>
<TBODY>
<TR>
<TD align=right width="65%"><A href="http://acm.zju.edu.cn/"><FONT
color=red>Zhejiang University Online Judge</FONT></A> <A
href="http://acm.zju.edu.cn/"><FONT color=red>V1.0</FONT></A></TD>
<TD align=right width="35%"><A href="http://www.zzhang.cn/"><FONT
color=#ffffff
size=-3>Book</FONT></A></TD></TR></TBODY></TABLE></CENTER></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -