This repository was archived by the owner on Apr 22, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path0020.html
More file actions
154 lines (153 loc) · 5.78 KB
/
0020.html
File metadata and controls
154 lines (153 loc) · 5.78 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<meta content="Word.Document" name="ProgId">
<meta content="Microsoft Word 11" name="Generator">
<meta content="Microsoft Word 11" name="Originator">
<link href="file:///C:\DOCUME~1\DEFEND~1\LOCALS~1\Temp\msohtml1\01\clip_filelist.xml" rel="File-List" /><!--[if gte mso 9]><xml>
<w:WordDocument>
<w:View>Normal</w:View>
<w:Zoom>0</w:Zoom>
<w:PunctuationKerning />
<w:ValidateAgainstSchemas />
<w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
<w:IgnoreMixedContent>false</w:IgnoreMixedContent>
<w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
<w:Compatibility>
<w:BreakWrappedTables />
<w:SnapToGridInCell />
<w:ApplyBreakingRules />
<w:WrapTextWithPunct />
<w:UseAsianBreakRules />
<w:DontGrowAutofit />
</w:Compatibility>
<w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
</w:WordDocument>
</xml><![endif]--><!--[if gte mso 9]><xml>
<w:LatentStyles DefLockedState="false" LatentStyleCount="156">
</w:LatentStyles>
</xml><![endif]--><style type="text/css">
<!--
/* Font Definitions */
@font-face
{font-family:"Angsana New";
panose-1:2 2 6 3 5 4 5 2 3 4;
mso-font-charset:0;
mso-generic-font-family:roman;
mso-font-pitch:variable;
mso-font-signature:16777219 0 0 0 65537 0;}
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;
mso-font-charset:0;
mso-generic-font-family:swiss;
mso-font-pitch:variable;
mso-font-signature:1627421319 -2147483648 8 0 66047 0;}
@font-face
{font-family:TTE18E94C8t00;
panose-1:0 0 0 0 0 0 0 0 0 0;
mso-font-alt:"MS Mincho";
mso-font-charset:128;
mso-generic-font-family:auto;
mso-font-format:other;
mso-font-pitch:auto;
mso-font-signature:1 134676480 16 0 131072 0;}
@font-face
{font-family:TTE2179AA8t00;
panose-1:0 0 0 0 0 0 0 0 0 0;
mso-font-alt:"Times New Roman";
mso-font-charset:238;
mso-generic-font-family:auto;
mso-font-format:other;
mso-font-pitch:auto;
mso-font-signature:5 0 0 0 2 0;}
@font-face
{font-family:"\@TTE18E94C8t00";
panose-1:0 0 0 0 0 0 0 0 0 0;
mso-font-charset:128;
mso-generic-font-family:auto;
mso-font-format:other;
mso-font-pitch:auto;
mso-font-signature:1 134676480 16 0 131072 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{mso-style-parent:"";
margin:0cm;
margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:12.0pt;
mso-bidi-font-size:14.0pt;
font-family:"Times New Roman";
mso-fareast-font-family:"Times New Roman";
mso-bidi-font-family:"Angsana New";}
@page Section1
{size:612.0pt 792.0pt;
margin:72.0pt 90.0pt 72.0pt 90.0pt;
mso-header-margin:36.0pt;
mso-footer-margin:36.0pt;
mso-paper-source:0;}
div.Section1
{page:Section1;}
-->
</style><!--[if gte mso 10]>
<style>
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-parent:"";
mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
mso-para-margin:0cm;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:10.0pt;
font-family:"Times New Roman";
mso-ansi-language:#0400;
mso-fareast-language:#0400;
mso-bidi-language:#0400;}
</style>
<![endif]-->
<p><span style="font-family: 'Courier New'; "><span style="font-size: small; ">ในรายการ "Dinner For Five" ผู้เข้าแข่งขัน 5 คนจะแข่งขันกันทำอาหาร โดยในแต่ละวัน จะมีผู้เข้าแข่งขันคนหนึ่งทำอาหาร แล้วให้อีก 4 คนที่เหลือให้คะแนน โดยคะแนนที่เป็นไปได้มีตั้งแต่ 1 ถึง 5 คะแนน<br />
<br />
ผู้เข้าแข่งขันจะได้คะแนนรวมเท่ากับผลรวมของคะแนนที่อีก 4 คนให้ ผู้ที่ได้คะแนนรวมมากที่สุดจะเป็นผู้ชนะ<br />
<br />
<u><strong>งานของคุณ</strong></u><br />
จงเขียนโปรแกรมเพื่อหาว่า ผู้เข้าแข่งขันคนใดเป็นผู้ชนะ และผู้ชนะได้คะแนนรวมทั้งหมดกี่คะแนน<br />
<br />
<u><strong>ข้อมูลนำเข้า</strong></u><br />
มี 5 บรรทัด โดยในบรรทัดที่ i จะมีจำนวนเต็มบวกอยู่ 4 จำนวน แทนคะแนนที่ผู้เข้าแข่งขันหมายเลข i ได้รับ<br />
<br />
จำนวนเต็มบวกแต่ละจำนวนจะมีค่าอยู่ในช่วง 1 ถึง 5<br />
<br />
รับประกันว่า ในข้อมูลทดสอบทั้งหมดจะมีผู้ชนะเพียงคนเดียวเสมอ<br />
<br />
<u><strong>ข้อมูลส่งออก</strong></u><br />
มีบรรทัดเดียว แสดงหมายเลขของผู้เข้าแข่งขันที่ชนะ และคะแนนรวมที่เขาได้รับ<br />
<br />
<b><u>ที่มา<br />
</u>COCI 2008/2009, Contest #3 – December 13<sup>th</sup>, 2008</b></span></span><strong><u><span style="font-size: 14pt;"><o:p></o:p></span></u></strong></p>
</meta>
</meta>
</meta>
</meta>
<table>
<tr>
<th>ข้อมูลนำเข้า</th>
<th>ข้อมูลส่งออก</th>
</tr>
<tr>
<td>5 4 4 5
<br />5 4 4 4
<br />5 5 4 4
<br />5 5 5 4
<br />4 4 4 5</td>
<td>4 19</td>
</tr>
<tr>
<td>4 4 3 3
<br />5 4 3 5
<br />5 5 2 4
<br />5 5 5 1
<br />4 4 4 4</td>
<td>2 17</td>
</tr></table>