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

📄 c.htm

📁 ACM精彩程序01(University_of_Waterloo_2_June_2001)包括源题目及解答
💻 HTM
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- saved from url=(0044)http://plg.uwaterloo.ca/~acm00/010602/C.html -->
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=GB18030">
<META content="MSHTML 6.00.2900.2963" name=GENERATOR></HEAD>
<BODY><IMG src="C.files/venn.gif" align=right> 
<H2>Problem C - Sumsets</H2>Given S, a set of integers, find the largest d such 
that a + b + c = d where a, b, c, and d are distinct elements of S. 
<H3>Input</H3>Several S, each consisting of a line containing an integer 1 &lt;= 
n &lt;= 1000 indicating the number of elements in S, followed by the elements of 
S, one per line. Each element of S is a distinct integer between -536870912 and 
+536870911 inclusive. The last line of input contains 0. 
<H3>Output</H3>For each S, a single line containing d, or a single line 
containing "no solution". 
<H3>Sample Input</H3><PRE>5
2 
3 
5 
7 
12
5
2 
16 
64 
256 
1024
0
</PRE>
<H3>Output for Sample Input</H3><PRE>12
no solution
</PRE></BODY></HTML>

⌨️ 快捷键说明

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