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

📄 problem 2191.htm

📁 浙江大学程序设计大赛ACM2191题我自己收集的
💻 HTM
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- saved from url=(0047)http://acm.zju.edu.cn/show_problem.php?pid=2191 -->
<HTML><HEAD><TITLE>Problem 2191</TITLE>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<META content="MSHTML 6.00.2800.1491" name=GENERATOR></HEAD>
<BODY>
<CENTER><IMG src="Problem 2191.files/logo.gif" align=center></IMG></CENTER>
<HR>

<CENTER><FONT color=blue size=+2>Series Determination</FONT></CENTER>
<HR>

<CENTER><FONT color=green>Time limit:</FONT> 1 Seconds&nbsp;&nbsp; <FONT 
color=green>Memory limit: </FONT>32768K&nbsp;&nbsp; </FONT><BR><FONT 
color=green>Total Submit:</FONT> 406&nbsp;&nbsp; <FONT color=green>Accepted 
Submit:</FONT> 279&nbsp;&nbsp; </CENTER>
<HR>

<P>Boudreaux and Thibodeaux aren't very good at math, so they need you to write 
a program that can determine the second degree polynomial used to generate a 
given sequence of three integers. As proof that you've figured out the 
polynomial, they want your program to print out the next <TT>3</TT> integers in 
the sequence.</P>
<P>You know that each sequence is generated by a polynomial of the form 
<I><B><TT>f(x) = Ax<SUP>2</SUP> + Bx + C</TT></B></I>, where <TT>A</TT>, 
<TT>B</TT>, and <TT>C</TT> are integers in the range (<TT>-10<SUP>3</SUP> ≤ (A, 
B, C) ≤ 10<SUP>3</SUP></TT>). You are given the values <I><B><TT>f(0), f(1), 
f(2)</TT></B></I> and are to determine the values <I><B><TT>f(3), f(4), 
f(5)</TT></B></I>.</P>
<P><B>Input:</B> 
<P>Input to this problem will consist of a (non-empty) series of up to 
<TT>100</TT> data sets. Each data set will be formatted according to the 
following description, and there will be <B>no blank lines</B> separating data 
sets.</P>
<P>Each data set consists of a single line containing the space-separated 
integer values of the polynomial evaluated at <TT>0</TT>, <TT>1</TT>, and 
<TT>2</TT> (in that order). These values will be in the range 
(<TT>-10<SUP>3</SUP> ≤ (<I><B>f(0), f(1), f(2)</B></I>) ≤ 10<SUP>3</SUP></TT>). 
</P>
<P><B>Output</B></P>
<P>For each data set, there will be exactly one line of output containing the 
space-separated integer values of the polynomial evaluated at <TT>3</TT>, 
<TT>4</TT>, and <TT>5</TT> (in that order). These values will be in the range 
(<TT>-10<SUP>4</SUP> ≤ (<I><B>f(3), f(4), f(5)</B></I>) ≤ 
10<SUP>4</SUP></TT>).</P>
<P><B>Sample Input</B></P>
<P>0 0 0<BR>1 1 1<BR>1 2 3<BR>0 1 4<BR>0 2 8<BR></P>
<P><B>Sample Output</B></P>
<P>0 0 0<BR>1 1 1<BR>4 5 6<BR>9 16 25<BR>18 32 50<BR></P>
<HR>

<CENTER><A href="http://acm.zju.edu.cn/submit.php?pid=2191">Submit</A> 
&nbsp;&nbsp;<A href="http://acm.zju.edu.cn/list_problem.php?vol=12">Back</A> 
&nbsp;&nbsp;<A 
href="http://acm.zju.edu.cn/problem_status.php?pid=2191">Status</A> </CENTER>
<HR>

<CENTER><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><BR></CENTER></BODY></HTML>

⌨️ 快捷键说明

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