This repository has been 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
/
0015.html
100 lines (99 loc) · 5.77 KB
/
0015.html
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
<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;}
/* 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-bidi-font-family:"Times New Roman";
mso-ansi-language:#0400;
mso-fareast-language:#0400;
mso-bidi-language:#0400;}
</style>
<![endif]-->
<p class="MsoNormal"><span lang="TH" style="font-size: 14pt; font-family: "Angsana New";">ในทะเลทรายแห่งหนึ่ง มีจิงโจ้ </span>3 <span lang="TH" style="font-size: 14pt; font-family: "Angsana New";">ตัวกำลังเล่นบนเส้นจำนวน (จำนวนเต็ม) เริ่มต้นนั้นแต่ละตัวจะอยู่บนจำนวนที่แตกต่างกัน ในตาหนึ่ง จะมีจิงโจ้ตัวหนึ่ง กระโดดเข้าไปในตำแหน่งตัวเลขจำนวนเต็มที่อยู่<b>ระหว่าง</b>จิงโจ้อีก </span>2 <span lang="TH" style="font-size: 14pt; font-family: "Angsana New";">ตัว และไม่มีครั้งใดที่จิงโจ้จะกระโดดไปอยู่ในตำแหน่งจำนวนเดียวกับตัวอื่นเลย</span></p>
<p class="MsoNormal"><b><u><span lang="TH" style="font-size: 14pt; font-family: "Angsana New";">โจทย์</span><o:p></o:p></u></b></p>
<p class="MsoNormal"><span lang="TH" style="font-size: 14pt; font-family: "Angsana New";">จงเขียนโปรแกรมเพื่อรับตำแหน่งของจิงโจ้ทั้ง </span>3 <span lang="TH" style="font-size: 14pt; font-family: "Angsana New";">ตัว และตอบว่าจะกระโดดได้มากที่สุดกี่ครั้ง ก่อนเกมจะจบลง (เล่นต่อไม่ได้แล้ว)</span></p>
<p class="MsoNormal"><b><u><span lang="TH" style="font-size: 14pt; font-family: "Angsana New";">ข้อมูลนำเข้า</span><o:p></o:p></u></b></p>
<p class="MsoNormal"><b><span lang="TH" style="font-size: 14pt; font-family: "Angsana New";">บรรัดแรก</span></b><span lang="TH" style="font-size: 14pt; font-family: "Angsana New";"> จำนวนเต็ม </span>3 <span lang="TH" style="font-size: 14pt; font-family: "Angsana New";">จำนวน </span>A, B, C <span lang="TH" style="font-size: 14pt; font-family: "Angsana New";">โดยที่ </span>0 < A < B < C < 100 <span lang="TH" style="font-size: 14pt; font-family: "Angsana New";">คือตำแหน่งเริ่มต้นของจิงโจ้ทั้งสามตัว</span></p>
<p class="MsoNormal"><b><u><span lang="TH" style="font-size: 14pt; font-family: "Angsana New";">ข้อมูลส่งออก</span><o:p></o:p></u></b></p>
<p class="MsoNormal"><span lang="TH" style="font-size: 14pt; font-family: "Angsana New";">บรรทัดเดียว จำนวนตาเล่นที่จิงโจ้สามารถเล่นได้มากที่สุด</span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><b><u><span lang="TH" style="font-size: 14pt; font-family: "Angsana New";">ที่มา:</span></u></b> <strong>COCI 2008/2009, Contest #1 – October 18, 2008<o:p></o:p></strong></p>
<table>
<tr>
<th>ข้อมูลนำเข้า</th>
<th>ข้อมูลส่งออก</th>
</tr>
<tr>
<td>2 3 5</td>
<td>1</td>
</tr>
<tr>
<td>3 5 9</td>
<td>3</td>
</tr></table>