⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 1455 -- crazy tea party.htm

📁 北大ACM1455(Crazy tea party)
💻 HTM
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- saved from url=(0061)http://acm.pku.edu.cn/JudgeOnline/showproblem?problem_id=1455 -->
<HTML><HEAD><TITLE>1455 -- Crazy tea party</TITLE>
<META http-equiv=Pragma content=no-cache>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<STYLE type=text/css>A {
	TEXT-DECORATION: none
}
A:hover {
	COLOR: red; TEXT-DECORATION: underline
}
</STYLE>

<META content="MSHTML 6.00.2900.2523" name=GENERATOR></HEAD>
<BODY vLink=blue aLink=blue link=blue leftMargin=5><A name=top></A>
<TABLE style="BORDER-COLLAPSE: collapse" borderColor=#ffffff width=980 
  border=1><TBODY>
  <TR>
    <TD align=middle colSpan=5><IMG height=97 
      src="1455 -- Crazy tea party.files/logo.jpg" width=980 border=0></TD></TR>
  <TR vAlign=top align=middle bgColor=#6589d1>
    <TH width=196>Online Judge</TH>
    <TH width=196>Problem Set</TH>
    <TH width=196>Authors</TH>
    <TH width=197>Online Contests</TH>
    <TH width=197>User</TH></TR>
  <TR vAlign=top align=middle bgColor=#f1f1fd>
    <TD><A href="http://acm.pku.edu.cn/JudgeOnline/bbs">Web Board</A><BR><A 
      href="http://acm.pku.edu.cn/JudgeOnline/">Home Page</A><BR><A 
      href="http://acm.pku.edu.cn/JudgeOnline/faq.htm" 
      target=_blank>F.A.Qs</A><BR>Announcement</TD>
    <TD>
      <FORM action=gotoproblem method=get><A 
      href="http://acm.pku.edu.cn/JudgeOnline/problemlist">Problems</A><BR><A 
      href="http://acm.pku.edu.cn/JudgeOnline/submitpage">Submit 
      Problem</A><BR><A href="http://acm.pku.edu.cn/JudgeOnline/status">Status 
      (Online)</A><BR><FONT color=blue>Prob.ID:</FONT><INPUT size=6 name=pid><INPUT type=submit value=Go name=pb1></FORM></TD>
    <TD>
      <FORM action=searchuser method=get><A 
      href="http://acm.pku.edu.cn/JudgeOnline/registerpage">Register</A><BR><A 
      href="http://acm.pku.edu.cn/JudgeOnline/modifyuserpage">Update your 
      info</A><BR><A href="http://acm.pku.edu.cn/JudgeOnline/userlist">Authors 
      ranklist</A><BR><INPUT size=10 name=user_id><INPUT type=submit value=Search name=B1></FORM></TD>
    <TD><FONT color=#1a5cc8>Current Contest</FONT><BR><A 
      href="http://acm.pku.edu.cn/JudgeOnline/pastcontests">Past 
      Contests</A><BR><A 
      href="http://acm.pku.edu.cn/JudgeOnline/contests">Scheduled 
      Contests</A><BR><A 
      href="http://acm.pku.edu.cn/JudgeOnline/awardcontest_announce.htm" 
      target=_blank><FONT color=red>Award Contest</FONT></A></TD>
    <TD align=left>Welcome<BR><A 
      href="http://acm.pku.edu.cn/JudgeOnline/userstatus?user_id=fjnu_jxd_009" 
      target=_parent><B>fjnu_jxd_009</B></A>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A 
      href="http://acm.pku.edu.cn/JudgeOnline/login?action=logout&amp;url=/JudgeOnline/showproblem?problem_id=1455">Log 
      Out</A><BR><A href="http://acm.pku.edu.cn/JudgeOnline/mail" 
      target=_parent><FONT 
color=blue>Mail:1(<B>0</B>)</FONT></A></TD></TR></TBODY></TABLE>
<TABLE width="100%" background="1455 -- Crazy tea party.files/table_back.jpg" 
border=0>
  <TBODY>
  <TR>
    <TD>
      <P align=center><FONT color=blue size=5>Crazy tea party</FONT> <BR>Time 
      Limit:1000MS&nbsp; Memory Limit:10000K<BR>Total Submit:1094 Accepted:747 
      </P>
      <P><FONT color=blue size=5>Description</FONT><BR><FONT 
      face="Times New Roman" size=3>n participants of &lt;&lt; crazy tea party 
      &gt;&gt; sit around the table. Each minute one pair of neighbors can 
      change their places. Find the minimum time (in minutes) required for all 
      participants to sit in reverse order (so that left neighbors would become 
      right, and right - left).</FONT></P>
      <P><FONT color=blue size=5>Input</FONT><BR><FONT face="Times New Roman" 
      size=3>The first line is the amount of tests. Each next line contains one 
      integer n (1 &lt;=&#61603; n &lt;=&#61603; 32767) - the amount of crazy tea 
      participants.</FONT></P>
      <P><FONT color=blue size=5>Output</FONT><BR><FONT face="Times New Roman" 
      size=3>For each number n of participants to crazy tea party print on the 
      standard output, on a separate line, the minimum time required for all 
      participants to sit in reverse order.</FONT></P>
      <P><FONT color=blue size=5>Sample Input</FONT><BR><FONT 
      face="Times New Roman" size=3><PRE>3
4
5
6</PRE></FONT>
      <P></P>
      <P><FONT color=blue size=5>Sample Output</FONT><BR><FONT 
      face="Times New Roman" size=3><PRE>2
4
6</PRE></FONT>
      <P></P>
      <P><FONT color=blue size=5>Source</FONT><BR><FONT face="Times New Roman" 
      size=3>Southeastern Europe 2003</FONT></P></TD></TR></TBODY></TABLE><FONT 
color=#333399 size=3>
<P align=center>[<A 
href="http://acm.pku.edu.cn/JudgeOnline/submitpage?problem_id=1455">Submit</A>]&nbsp;&nbsp; 
[<A href="javascript:history.go(-1)">Go Back</A>]&nbsp;&nbsp; [<A 
href="http://acm.pku.edu.cn/JudgeOnline/problemstatus?problem_id=1455">Status</A>]&nbsp;&nbsp; 
[<A href="http://acm.pku.edu.cn/JudgeOnline/bbs?problem_id=1455">Discuss</A>] 
</FONT></P>
<P><IMG height=29 src="1455 -- Crazy tea party.files/home.jpg" width=40 
border=0><FONT size=3><A href="http://acm.pku.edu.cn/JudgeOnline/">Home Page</A> 
</FONT>&nbsp;&nbsp;<IMG height=29 src="1455 -- Crazy tea party.files/goback.jpg" 
width=40 border=0><FONT size=3><A href="javascript:history.go(-1)">Go 
Back</A>&nbsp;&nbsp;<IMG height=29 src="1455 -- Crazy tea party.files/top.jpg" 
width=40 border=0><A 
href="http://acm.pku.edu.cn/JudgeOnline/showproblem?problem_id=1455#top">To 
top</A></FONT><BR>
<HR>

<P align=center><FONT size=3>All Copyright Reserved 2003-2005 Ying Fuchen,Xu 
Pengcheng<BR>Any problem, Please <A href="mailto:hawking@pku.edu.cn">Contact 
Administrator</A></FONT></P></BODY></HTML>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -