<!DOCTYPE html>
    <html lang="vi" xmlns="http://www.w3.org/1999/xhtml" prefix="og: http://ogp.me/ns#">
    <head>
<title>Đề thi HSG cấp trường môn Tin học 2018</title>
<meta name="description" content="Đề thi HSG cấp trường môn Tin học 2018 - Savefile - Tin Tức - http&#x3A;&#x002F;&#x002F;thptphuquoc.edu.vn&#x002F;savefile&#x002F;de-thi-hsg&#x002F;de-thi-hsg-cap-truong-mon-tin-hoc-2018-203.html">
<meta name="author" content="Trường THPT Phú Quốc">
<meta name="copyright" content="Trường THPT Phú Quốc [webmaster@thptphuquoc.edu.vn]">
<meta name="robots" content="index, archive, follow, noodp">
<meta name="googlebot" content="index,archive,follow,noodp">
<meta name="msnbot" content="all,index,follow">
<meta name="generator" content="NukeViet v4.3">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta property="og:title" content="Đề thi HSG cấp trường môn Tin học 2018">
<meta property="og:type" content="website">
<meta property="og:description" content="Savefile - Tin Tức - http&#x3A;&#x002F;&#x002F;thptphuquoc.edu.vn&#x002F;savefile&#x002F;de-thi-hsg&#x002F;de-thi-hsg-cap-truong-mon-tin-hoc-2018-203.html">
<meta property="og:site_name" content="Trường THPT Phú Quốc">
<meta property="og:url" content="http://thptphuquoc.edu.vn/de-thi-hsg/de-thi-hsg-cap-truong-mon-tin-hoc-2018-203.html">
<link rel="shortcut icon" href="http://thptphuquoc.edu.vn/favicon.ico">
<link rel="canonical" href="http://thptphuquoc.edu.vn/de-thi-hsg/de-thi-hsg-cap-truong-mon-tin-hoc-2018-203.html">
<link rel="alternate" href="http://thptphuquoc.edu.vn/rss/" title="Tin Tức" type="application/rss+xml">
<link rel="alternate" href="http://thptphuquoc.edu.vn/rss/tin-tuc/" title="Tin Tức - TIN TỨC" type="application/rss+xml">
<link rel="alternate" href="http://thptphuquoc.edu.vn/rss/thong-bao/" title="Tin Tức - THÔNG BÁO" type="application/rss+xml">
<link rel="alternate" href="http://thptphuquoc.edu.vn/rss/tuyen-sinh-lop-10/" title="Tin Tức - TUYỂN SINH LỚP 10" type="application/rss+xml">
<link rel="alternate" href="http://thptphuquoc.edu.vn/rss/cac-to-chuc/" title="Tin Tức - CÁC TỔ CHỨC" type="application/rss+xml">
<link rel="alternate" href="http://thptphuquoc.edu.vn/rss/dang-bo/" title="Tin Tức - Đảng bộ" type="application/rss+xml">
<link rel="alternate" href="http://thptphuquoc.edu.vn/rss/cac-chi-bo/" title="Tin Tức - Các chi bộ" type="application/rss+xml">
<link rel="alternate" href="http://thptphuquoc.edu.vn/rss/ban-giam-hieu/" title="Tin Tức - Ban giám hiệu" type="application/rss+xml">
<link rel="alternate" href="http://thptphuquoc.edu.vn/rss/cong-doan/" title="Tin Tức - Công đoàn" type="application/rss+xml">
<link rel="alternate" href="http://thptphuquoc.edu.vn/rss/to-chuyen-mon-83/" title="Tin Tức - Tổ chuyên môn" type="application/rss+xml">
<link rel="alternate" href="http://thptphuquoc.edu.vn/rss/doan-thanh-nien/" title="Tin Tức - Đoàn thanh niên" type="application/rss+xml">
<link rel="alternate" href="http://thptphuquoc.edu.vn/rss/hoi-khuyen-hoc/" title="Tin Tức - Hội khuyến học" type="application/rss+xml">
<link rel="alternate" href="http://thptphuquoc.edu.vn/rss/hoi-phu-huynh-hs/" title="Tin Tức - Hội cha mẹ học sinh" type="application/rss+xml">
<link rel="alternate" href="http://thptphuquoc.edu.vn/rss/noo/" title="Tin Tức - NỘI QUY, QUY CHẾ" type="application/rss+xml">
<link rel="alternate" href="http://thptphuquoc.edu.vn/rss/tkb/" title="Tin Tức - THỜI KHÓA BIỂU" type="application/rss+xml">
<link rel="alternate" href="http://thptphuquoc.edu.vn/rss/tuyen-dung/" title="Tin Tức - CÁC KẾ HOẠCH" type="application/rss+xml">
<link rel="alternate" href="http://thptphuquoc.edu.vn/rss/dien-hinh-tien-tien/" title="Tin Tức - ĐIỂN HÌNH TIÊN TIẾN" type="application/rss+xml">
<link rel="alternate" href="http://thptphuquoc.edu.vn/rss/tai-nguyen/" title="Tin Tức - TÀI NGUYÊN" type="application/rss+xml">
<link rel="alternate" href="http://thptphuquoc.edu.vn/rss/tai-lieu/" title="Tin Tức - Tài liệu" type="application/rss+xml">
<link rel="alternate" href="http://thptphuquoc.edu.vn/rss/de-kiem-tra/" title="Tin Tức - Đề thi, đề kiểm tra" type="application/rss+xml">
<link rel="alternate" href="http://thptphuquoc.edu.vn/rss/de-thi-hsg/" title="Tin Tức - Đề thi học sinh giỏi" type="application/rss+xml">
<link rel="alternate" href="http://thptphuquoc.edu.vn/rss/sang-kien-giai-phap/" title="Tin Tức - Sáng kiến, giải pháp" type="application/rss+xml">
<link rel="alternate" href="http://thptphuquoc.edu.vn/rss/phuong-phap-hoc-tap/" title="Tin Tức - Phương pháp học tập" type="application/rss+xml">
<link rel="alternate" href="http://thptphuquoc.edu.vn/rss/cac-van-ban/" title="Tin Tức - Các văn bản" type="application/rss+xml">
<link rel="alternate" href="http://thptphuquoc.edu.vn/rss/cac-phan-mem/" title="Tin Tức - Các phần mềm" type="application/rss+xml">
<link rel="alternate" href="http://thptphuquoc.edu.vn/rss/trai-nghiem-sang-tao/" title="Tin Tức - TRẢI NGHIỆM-SÁNG TẠO" type="application/rss+xml">
<link rel="alternate" href="http://thptphuquoc.edu.vn/rss/bai-viet-26/" title="Tin Tức - BÀI VIẾT" type="application/rss+xml">
<link rel="alternate" href="http://thptphuquoc.edu.vn/rss/cac-cau-lac-bo/" title="Tin Tức - ĐOÀN, HỘI" type="application/rss+xml">
<link rel="alternate" href="http://thptphuquoc.edu.vn/rss/goc-doan-truong/" title="Tin Tức - Đoàn trường" type="application/rss+xml">
<link rel="alternate" href="http://thptphuquoc.edu.vn/rss/goc-cong-doan/" title="Tin Tức - Công đoàn" type="application/rss+xml">
<link rel="alternate" href="http://thptphuquoc.edu.vn/rss/clb-toan-hoc/" title="Tin Tức - Câu lạc bộ Toán học" type="application/rss+xml">
<link rel="alternate" href="http://thptphuquoc.edu.vn/rss/clb-tieng-anh/" title="Tin Tức - Câu lạc bộ Tiếng anh" type="application/rss+xml">
<link rel="alternate" href="http://thptphuquoc.edu.vn/rss/http-123cunghoctin-com/" title="Tin Tức - Câu lạc bộ Tin học" type="application/rss+xml">
<link rel="alternate" href="http://thptphuquoc.edu.vn/rss/clb-van-hoc/" title="Tin Tức - Câu lạc bộ Văn học" type="application/rss+xml">
<link rel="alternate" href="http://thptphuquoc.edu.vn/rss/thu-vien/" title="Tin Tức - THƯ VIỆN" type="application/rss+xml">
<link rel="preload" as="script" href="http://thptphuquoc.edu.vn/assets/js/jquery/jquery.min.js">
<link rel="preload" as="script" href="http://thptphuquoc.edu.vn/assets/js/language/vi.js">
<link rel="preload" as="script" href="http://thptphuquoc.edu.vn/assets/js/global.js">
<link rel="preload" as="script" href="http://thptphuquoc.edu.vn/themes/default/js/news.js">
<link rel="preload" as="script" href="http://thptphuquoc.edu.vn/themes/default/js/main.js">
<link rel="preload" as="script" href="http://thptphuquoc.edu.vn/themes/default/js/custom.js">
<link rel="preload" as="script" href="http://thptphuquoc.edu.vn/themes/default/js/bootstrap.min.js">
<link rel="stylesheet" href="http://thptphuquoc.edu.vn/assets/css/font-awesome.min.css">
<link rel="stylesheet" href="http://thptphuquoc.edu.vn/themes/default/css/bootstrap.min.css">
<link rel="stylesheet" href="http://thptphuquoc.edu.vn/themes/default/css/style.css">
<link rel="stylesheet" href="http://thptphuquoc.edu.vn/themes/default/css/style.responsive.css">
<link rel="StyleSheet" href="http://thptphuquoc.edu.vn/themes/default/css/news.css">
<link rel="stylesheet" href="http://thptphuquoc.edu.vn/themes/default/css/custom.css">
<link rel="stylesheet" href="http://thptphuquoc.edu.vn/assets/css/default.vi.0.css">
<style>
	body{background: #fff;}
</style>
    </head>
    <body>
<div id="print">
	<div id="hd_print">
		<h2 class="pull-left">Trường THPT Phú Quốc</h2>
		<p class="pull-right"><a title="Trường THPT Phú Quốc" href="http://thptphuquoc.edu.vn/">http://thptphuquoc.edu.vn</a></p>
	</div>
	<div class="clear"></div>
	<hr />
	<div id="content">
		<h1>Đề thi HSG cấp trường môn Tin học 2018</h1>
		<ul class="list-inline">
			<li>Thứ hai - 01/10/2018 23:25</li>
			<li class="hidden-print txtrequired"><em class="fa fa-print">&nbsp;</em><a title="In ra" href="javascript:;" onclick="window.print()">In ra</a></li>
			<li class="hidden-print txtrequired"><em class="fa fa-power-off">&nbsp;</em><a title="Đóng cửa sổ này" href="javascript:;" onclick="window.close()">Đóng cửa sổ này</a></li>
		</ul>
		<div class="clear"></div>
		<div id="hometext">
			Ngày thi 01/10/2018 - GV ra đề Phạm Tiến
		</div>
				<div class="imghome">
			<img alt="Đề thi HSG cấp trường môn Tin học 2018" src="http://thptphuquoc.edu.vn/uploads/news/2018_10/images2636850_dsc00154.jpg" width="460" class="img-thumbnail" />
		</div>
		<div class="clear"></div>
		<div id="bodytext" class="clearfix">
			<table align="center" class="Table" style="border-collapse:collapse; border:undefined">
	<tbody>
		<tr>
			<td style="width:4.2in; padding:0in 5.4pt 0in 5.4pt" valign="top" width="403"><span style="font-size:12pt"><span style="font-family:&#039;Times New Roman&#039;,serif"><b>ĐỀ THI HỌC SINH GIỎI CẤP TRƯỜNG</b></span></span><br  />
			<span style="font-size:12pt"><span style="font-family:&#039;Times New Roman&#039;,serif"><b>MÔN TIN HỌC - NĂM HỌC 2018-2019</b></span></span>
			<div style="text-align: center;"><span style="font-size:12pt"><span style="tab-stops:12.3pt center 145.8pt"><span style="font-family:&#039;Times New Roman&#039;,serif"><b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Thời gian: 120&nbsp; phút</b></span></span></span></div>

			<div style="text-align: center;"><span style="font-size:12pt"><span style="tab-stops:12.3pt center 145.8pt"><span style="font-family:&#039;Times New Roman&#039;,serif"><i>(Đề thi gồm có 02 trang)</i></span></span></span></div>
			</td>
		</tr>
	</tbody>
</table>
<span style="font-size:12pt"><span style="font-family:&#039;Times New Roman&#039;,serif"><i>Em hãy dùng ngôn ngữ lập trình Pascal viết chương trình để giải các bài toán sau, mỗi bài viết một chương trình và lưu vào <b>D:\HSG2018\Tên_bài.PAS</b></i></span></span><br  />
<br  />
<span style="font-size:12pt"><span style="font-family:&#039;Times New Roman&#039;,serif"><b><u>Bài 1</u> (5 điểm)<u> </u></b>. <b>Trà sữa</b></span></span><br  />
<span style="font-size:12pt"><span style="font-family:&#039;Times New Roman&#039;,serif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Quán trà sữa QUỲNH có chương trình khuyến mãi cho khách hàng như sau:</span></span><br  />
<span style="font-size:12pt"><span style="font-family:&#039;Times New Roman&#039;,serif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; - Mua 5 ly tặng 3 ly,</span></span><br  />
<span style="font-size:12pt"><span style="font-family:&#039;Times New Roman&#039;,serif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; - Mua mua 2 ly tặng 1 ly</span></span><br  />
<span style="font-size:12pt"><span style="font-family:&#039;Times New Roman&#039;,serif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Viết chương trình nhập vào số ly trà sữa khách hàng mua (Tối đa 100 ly). Xuất ra màn hình số ly trà sữa được tặng sao cho số ly được tặng là nhiều nhất.</span></span><br  />
<span style="font-size:12pt"><span style="font-family:&#039;Times New Roman&#039;,serif"><b>Ví dụ</b></span></span>

<table class="MsoTableGrid" style="border-collapse:collapse; border:solid windowtext 1.0pt">
	<tbody>
		<tr>
			<td style="border:solid windowtext 1.0pt; width:232.2pt; padding:0in 5.4pt 0in 5.4pt" valign="top" width="310"><span style="font-size:12pt"><span style="font-family:&#039;Times New Roman&#039;,serif"><b>Nhập số ly khách mua: 7</b></span></span><br  />
			<span style="font-size:12pt"><span style="font-family:&#039;Times New Roman&#039;,serif"><b>Số ly được tặng: 4</b></span></span></td>
			<td style="border:solid windowtext 1.0pt; width:232.2pt; border-left:none; padding:0in 5.4pt 0in 5.4pt" valign="top" width="310"><span style="font-size:12pt"><span style="font-family:&#039;Times New Roman&#039;,serif"><b>Nhập số ly khách mua: 12</b></span></span><br  />
			<span style="font-size:12pt"><span style="font-family:&#039;Times New Roman&#039;,serif"><b>Số ly được tặng: 7</b></span></span></td>
		</tr>
	</tbody>
</table>
<br  />
<span style="font-size:12pt"><span style="font-family:&#039;Times New Roman&#039;,serif"><b><u>Bài 2</u> ( 5 điểm)</b>. <b>Tiền điện</b></span></span><br  />
<span style="font-size:12pt"><span style="font-family:&#039;Times New Roman&#039;,serif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Tiền điện hàng tháng của hộ gia đình được tính như sau:</span></span><br  />
<span style="font-size:12pt"><span style="font-family:&#039;Times New Roman&#039;,serif">- 100 KW đầu giá 1000 đồng/KW</span></span><br  />
<span style="font-size:12pt"><span style="font-family:&#039;Times New Roman&#039;,serif">- 100 KW tiếp theo giá 1500 đồng/KW</span></span><br  />
<span style="font-size:12pt"><span style="font-family:&#039;Times New Roman&#039;,serif">- 50 KW tiếp theo giá 2000 đồng/KW</span></span><br  />
<span style="font-size:12pt"><span style="font-family:&#039;Times New Roman&#039;,serif">- Các KW còn lại giá 2500 đồng/KW</span></span><br  />
<span style="font-size:12pt"><span style="font-family:&#039;Times New Roman&#039;,serif">Viết chương trình nhập vào số KW khách hàng sử dụng (tối đa 1000). Cho biết số tiền phải trả.</span></span><br  />
<span style="font-size:12pt"><span style="font-family:&#039;Times New Roman&#039;,serif"><b>Ví dụ</b></span></span>

<table class="MsoTableGrid" style="border-collapse:collapse; border:solid windowtext 1.0pt">
	<tbody>
		<tr>
			<td style="border:solid windowtext 1.0pt; width:232.2pt; padding:0in 5.4pt 0in 5.4pt" valign="top" width="310"><span style="font-size:12pt"><span style="font-family:&#039;Times New Roman&#039;,serif"><b>Nhập số KW khách hàng sử dụng: 220</b></span></span><br  />
			<span style="font-size:12pt"><span style="font-family:&#039;Times New Roman&#039;,serif"><b>Số tiền phải trả: 290000 đồng</b></span></span></td>
			<td style="border:solid windowtext 1.0pt; width:232.2pt; border-left:none; padding:0in 5.4pt 0in 5.4pt" valign="top" width="310"><span style="font-size:12pt"><span style="font-family:&#039;Times New Roman&#039;,serif"><b>Nhập số KW khách hàng sử dụng: 300</b></span></span><br  />
			<span style="font-size:12pt"><span style="font-family:&#039;Times New Roman&#039;,serif"><b>Số tiền phải trả: 475000 đồng</b></span></span></td>
		</tr>
	</tbody>
</table>
<br  />
<span style="font-size:12pt"><span style="font-family:&#039;Times New Roman&#039;,serif"><b><u>Bài 3</u></b>. <b>Xâu con dài nhất</b></span></span><br  />
<span style="font-size:12pt"><span style="font-family:&#039;Times New Roman&#039;,serif">Nhập vào một xâu bất kỳ từ bàn phím (tối đa 255 ký tự). Cho biết</span></span><br  />
<span style="font-size:12pt"><span style="font-family:&#039;Times New Roman&#039;,serif">a. Độ dài lớn nhất của xâu con chứa liên tiếp các ký tự a.</span></span><br  />
<span style="font-size:12pt"><span style="font-family:&#039;Times New Roman&#039;,serif">b. Xuất ra màn hình xâu con dài nhất vừa tìm được</span></span><br  />
<span style="font-size:12pt"><span style="font-family:&#039;Times New Roman&#039;,serif"><b>Ví dụ</b></span></span>

<table class="MsoTableGrid" style="border-collapse:collapse; border:solid windowtext 1.0pt">
	<tbody>
		<tr>
			<td style="border:solid windowtext 1.0pt; width:232.2pt; padding:0in 5.4pt 0in 5.4pt" valign="top" width="310"><span style="font-size:12pt"><span style="font-family:&#039;Times New Roman&#039;,serif"><b>Nhập xâu bất kỳ: abacaaaadef</b></span></span><br  />
			<span style="font-size:12pt"><span style="font-family:&#039;Times New Roman&#039;,serif"><b>Độ dài lớn nhất của xâu con: 4</b></span></span><br  />
			<span style="font-size:12pt"><span style="font-family:&#039;Times New Roman&#039;,serif"><b>Xâu con dài nhất: aaaa</b></span></span></td>
			<td style="border:solid windowtext 1.0pt; width:232.2pt; border-left:none; padding:0in 5.4pt 0in 5.4pt" valign="top" width="310"><span style="font-size:12pt"><span style="font-family:&#039;Times New Roman&#039;,serif"><b>Nhập xâu bất kỳ: abcdef</b></span></span><br  />
			<span style="font-size:12pt"><span style="font-family:&#039;Times New Roman&#039;,serif"><b>Độ dài lớn nhất của xâu con: 1</b></span></span><br  />
			<span style="font-size:12pt"><span style="font-family:&#039;Times New Roman&#039;,serif"><b>Xâu con dài nhất: a</b></span></span></td>
		</tr>
	</tbody>
</table>
<br  />
<span style="font-size:12pt"><span style="font-family:&#039;Times New Roman&#039;,serif"><b><u><span style="font-size:13.0pt"><span style="color:black">Bài 4</span></span></u></b><b><span style="font-size:13.0pt"><span style="color:black"> (5 điểm). Mật khẩu</span></span></b></span></span><br  />
<span style="font-size:12pt"><span style="font-family:&#039;Times New Roman&#039;,serif"><span style="font-size:13.0pt"><span style="color:black">Mật khẩu an toàn là mật khẩu có độ dài ít nhất 8 ký tự, mật khẩu an toàn phải bao gồm: chữ cái in hoa, chữ cái in thường, chữ số và các ký tự đặc biệt trong bảng mã ASCII. </span></span></span></span><br  />
<span style="font-size:12pt"><span style="font-family:&#039;Times New Roman&#039;,serif"><span style="font-size:13.0pt"><span style="color:black">Viết chương trình nhập vào một chuỗi làm mật khẩu và cho biết mật khẩu đó có phải là mật khẩu an toàn hay không. Nếu mật khẩu đó là mật khẩu an toàn thì xuất ra chuỗi mã hóa mật khẩu vừa nhập với quy định mã hóa như sau: </span></span></span></span><br  />
<span style="font-size:12pt"><span style="font-family:&#039;Times New Roman&#039;,serif"><span style="font-size:13.0pt"><span style="color:black">- Nếu ký tự đó là chữ số thì ký tự được mã hóa chính là số đó</span></span></span></span><br  />
<span style="font-size:12pt"><span style="font-family:&#039;Times New Roman&#039;,serif"><span style="font-size:13.0pt"><span style="color:black">- Nếu ký tự đó là chữ cái hoặc các ký tự đặc biệt thì ký tự mã hóa là ký tự đứng sau ký tự đó 1 vị trí trong bảng mã ASCII</span></span></span></span><br  />
<br clear="all" style="page-break-before:always" />
<span style="font-size:12pt"><span style="font-family:&#039;Times New Roman&#039;,serif"><b><span style="font-size:13.0pt"><span style="color:black">Ví dụ</span></span></b></span></span>

<table class="MsoTableGrid" style="border-collapse:collapse; border:solid windowtext 1.0pt">
	<tbody>
		<tr>
			<td style="border:solid windowtext 1.0pt; width:232.2pt; padding:0in 5.4pt 0in 5.4pt" valign="top" width="310"><span style="font-size:12pt"><span style="font-family:&#039;Times New Roman&#039;,serif"><b>Nhập mật khẩu: 123456aA</b></span></span><br  />
			<span style="font-size:12pt"><span style="font-family:&#039;Times New Roman&#039;,serif"><b>Mật khẩu không an toàn!</b></span></span></td>
			<td style="border:solid windowtext 1.0pt; width:232.2pt; border-left:none; padding:0in 5.4pt 0in 5.4pt" valign="top" width="310"><span style="font-size:12pt"><span style="font-family:&#039;Times New Roman&#039;,serif"><b>Nhập mật khẩu: 123456aA@</b></span></span><br  />
			<span style="font-size:12pt"><span style="font-family:&#039;Times New Roman&#039;,serif"><b>Mật khẩu an toàn!</b></span></span><br  />
			<span style="font-size:12pt"><span style="font-family:&#039;Times New Roman&#039;,serif"><b>Chuỗi mã hóa mật khẩu là: 123456bBA</b></span></span></td>
		</tr>
	</tbody>
</table>
<br  />
<br  />
<span style="font-size:12pt"><span style="font-family:&#039;Times New Roman&#039;,serif"><b>-----------------------Hết---------------------</b></span></span><br  />
<br  />
&nbsp;
<table align="center" class="Table" style="border-collapse:collapse; border:undefined">
	<tbody>
		<tr>
			<td style="width:1.95in; padding:0in 5.4pt 0in 5.4pt" valign="top" width="187"><span style="font-size:12pt"><span style="font-family:&#039;Times New Roman&#039;,serif"><b>Trường THPT Phú Quốc</b></span></span><br  />
			<span style="font-size:12pt"><span style="font-family:&#039;Times New Roman&#039;,serif"><b>Tổ Toán - Tin</b></span></span><br  />
			<span style="font-size:12pt"><span style="font-family:&#039;Times New Roman&#039;,serif"><b>--------------</b></span></span></td>
			<td style="width:4.2in; padding:0in 5.4pt 0in 5.4pt" valign="top" width="403"><span style="font-size:12pt"><span style="font-family:&#039;Times New Roman&#039;,serif"><b>ĐỀ THI HỌC SINH GIỎI CẤP TRƯỜNG</b></span></span><br  />
			<span style="font-size:12pt"><span style="font-family:&#039;Times New Roman&#039;,serif"><b>MÔN TIN HỌC - NĂM HỌC 2018-2019</b></span></span><br  />
			<span style="font-size:12pt"><span style="font-family:&#039;Times New Roman&#039;,serif"><b>Thời gian: 120&nbsp; phút</b></span></span><br  />
			&nbsp;</td>
		</tr>
	</tbody>
</table>
<span style="font-size:12pt"><span style="font-family:&#039;Times New Roman&#039;,serif"><b>ĐÁP ÁN VÀ HƯỚNG DẪN CHẤM</b></span></span><br  />
<span style="font-size:12pt"><span style="font-family:&#039;Times New Roman&#039;,serif"><b>Bài 1. (5 điểm)</b></span></span><br  />
&nbsp;
<table class="Table" style="border-collapse:collapse; border:solid windowtext 1.0pt">
	<tbody>
		<tr>
			<td style="border:solid windowtext 1.0pt; width:155.4pt; padding:0in 5.4pt 0in 5.4pt" valign="top" width="207"><span style="font-size:12pt"><span style="font-family:&#039;Times New Roman&#039;,serif"><b>Nhập vào</b></span></span></td>
			<td style="border:solid windowtext 1.0pt; width:228.0pt; border-left:none; padding:0in 5.4pt 0in 5.4pt" valign="top" width="304"><span style="font-size:12pt"><span style="font-family:&#039;Times New Roman&#039;,serif"><b>Xuất ra</b></span></span></td>
			<td style="border:solid windowtext 1.0pt; width:81.0pt; border-left:none; padding:0in 5.4pt 0in 5.4pt" valign="top" width="108"><span style="font-size:12pt"><span style="font-family:&#039;Times New Roman&#039;,serif"><b>Điểm</b></span></span></td>
		</tr>
		<tr>
			<td style="border:solid windowtext 1.0pt; width:155.4pt; border-top:none; padding:0in 5.4pt 0in 5.4pt" width="207"><span style="font-size:12pt"><span style="font-family:&#039;Times New Roman&#039;,serif">Nhập số ly khách mua: 7</span></span></td>
			<td style="border-bottom:solid windowtext 1.0pt; width:228.0pt; border-top:none; border-left:none; border-right:solid windowtext 1.0pt; padding:0in 5.4pt 0in 5.4pt" width="304"><span style="font-size:12pt"><span style="font-family:&#039;Times New Roman&#039;,serif">Số ly được tặng: 4</span></span></td>
			<td style="border-bottom:solid windowtext 1.0pt; width:81.0pt; border-top:none; border-left:none; border-right:solid windowtext 1.0pt; padding:0in 5.4pt 0in 5.4pt" width="108"><span style="font-size:12pt"><span style="font-family:&#039;Times New Roman&#039;,serif">2 điểm</span></span></td>
		</tr>
		<tr>
			<td style="border:solid windowtext 1.0pt; width:155.4pt; border-top:none; padding:0in 5.4pt 0in 5.4pt" width="207"><span style="font-size:12pt"><span style="font-family:&#039;Times New Roman&#039;,serif">Nhập số ly khách mua: 12</span></span></td>
			<td style="border-bottom:solid windowtext 1.0pt; width:228.0pt; border-top:none; border-left:none; border-right:solid windowtext 1.0pt; padding:0in 5.4pt 0in 5.4pt" width="304"><span style="font-size:12pt"><span style="font-family:&#039;Times New Roman&#039;,serif">Số ly được tặng: 7</span></span></td>
			<td style="border-bottom:solid windowtext 1.0pt; width:81.0pt; border-top:none; border-left:none; border-right:solid windowtext 1.0pt; padding:0in 5.4pt 0in 5.4pt" width="108"><span style="font-size:12pt"><span style="font-family:&#039;Times New Roman&#039;,serif">2 điểm</span></span></td>
		</tr>
		<tr>
			<td style="border:solid windowtext 1.0pt; width:155.4pt; border-top:none; padding:0in 5.4pt 0in 5.4pt" width="207"><span style="font-size:12pt"><span style="font-family:&#039;Times New Roman&#039;,serif">Nhập số ly khách mua: 21</span></span></td>
			<td style="border-bottom:solid windowtext 1.0pt; width:228.0pt; border-top:none; border-left:none; border-right:solid windowtext 1.0pt; padding:0in 5.4pt 0in 5.4pt" width="304"><span style="font-size:12pt"><span style="font-family:&#039;Times New Roman&#039;,serif">Số ly được tặng: 12</span></span></td>
			<td style="border-bottom:solid windowtext 1.0pt; width:81.0pt; border-top:none; border-left:none; border-right:solid windowtext 1.0pt; padding:0in 5.4pt 0in 5.4pt" width="108"><span style="font-size:12pt"><span style="font-family:&#039;Times New Roman&#039;,serif">1 điểm</span></span></td>
		</tr>
	</tbody>
</table>
<br  />
<span style="font-size:12pt"><span style="font-family:&#039;Times New Roman&#039;,serif"><b>Bài 2. (5 điểm)</b></span></span><br  />
&nbsp;
<table class="Table" style="border-collapse:collapse; border:solid windowtext 1.0pt">
	<tbody>
		<tr>
			<td style="border:solid windowtext 1.0pt; width:221.4pt; padding:0in 5.4pt 0in 5.4pt" valign="top" width="295"><span style="font-size:12pt"><span style="font-family:&#039;Times New Roman&#039;,serif"><b>Nhập vào</b></span></span></td>
			<td style="border:solid windowtext 1.0pt; width:2.25in; border-left:none; padding:0in 5.4pt 0in 5.4pt" valign="top" width="216"><span style="font-size:12pt"><span style="font-family:&#039;Times New Roman&#039;,serif"><b>Xuất ra</b></span></span></td>
			<td style="border:solid windowtext 1.0pt; width:81.0pt; border-left:none; padding:0in 5.4pt 0in 5.4pt" valign="top" width="108"><span style="font-size:12pt"><span style="font-family:&#039;Times New Roman&#039;,serif"><b>Điểm</b></span></span></td>
		</tr>
		<tr>
			<td style="border:solid windowtext 1.0pt; width:221.4pt; border-top:none; padding:0in 5.4pt 0in 5.4pt" width="295"><span style="font-size:12pt"><span style="font-family:&#039;Times New Roman&#039;,serif">Nhập số KW khách hàng sử dụng: 220</span></span></td>
			<td style="border-bottom:solid windowtext 1.0pt; width:2.25in; border-top:none; border-left:none; border-right:solid windowtext 1.0pt; padding:0in 5.4pt 0in 5.4pt" width="216"><span style="font-size:12pt"><span style="font-family:&#039;Times New Roman&#039;,serif">Số tiền phải trả: 290000 đồng</span></span></td>
			<td style="border-bottom:solid windowtext 1.0pt; width:81.0pt; border-top:none; border-left:none; border-right:solid windowtext 1.0pt; padding:0in 5.4pt 0in 5.4pt" width="108"><span style="font-size:12pt"><span style="font-family:&#039;Times New Roman&#039;,serif">2 điểm</span></span></td>
		</tr>
		<tr>
			<td style="border:solid windowtext 1.0pt; width:221.4pt; border-top:none; padding:0in 5.4pt 0in 5.4pt" width="295"><span style="font-size:12pt"><span style="font-family:&#039;Times New Roman&#039;,serif">Nhập số KW khách hàng sử dụng: 300</span></span></td>
			<td style="border-bottom:solid windowtext 1.0pt; width:2.25in; border-top:none; border-left:none; border-right:solid windowtext 1.0pt; padding:0in 5.4pt 0in 5.4pt" width="216"><span style="font-size:12pt"><span style="font-family:&#039;Times New Roman&#039;,serif">Số tiền phải trả: 475000 đồng</span></span></td>
			<td style="border-bottom:solid windowtext 1.0pt; width:81.0pt; border-top:none; border-left:none; border-right:solid windowtext 1.0pt; padding:0in 5.4pt 0in 5.4pt" width="108"><span style="font-size:12pt"><span style="font-family:&#039;Times New Roman&#039;,serif">2 điểm</span></span></td>
		</tr>
		<tr>
			<td style="border:solid windowtext 1.0pt; width:221.4pt; border-top:none; padding:0in 5.4pt 0in 5.4pt" width="295"><span style="font-size:12pt"><span style="font-family:&#039;Times New Roman&#039;,serif">Nhập số KW khách hàng sử dụng: 500</span></span></td>
			<td style="border-bottom:solid windowtext 1.0pt; width:2.25in; border-top:none; border-left:none; border-right:solid windowtext 1.0pt; padding:0in 5.4pt 0in 5.4pt" width="216"><span style="font-size:12pt"><span style="font-family:&#039;Times New Roman&#039;,serif">Số tiền phải trả: 975000 đồng</span></span></td>
			<td style="border-bottom:solid windowtext 1.0pt; width:81.0pt; border-top:none; border-left:none; border-right:solid windowtext 1.0pt; padding:0in 5.4pt 0in 5.4pt" width="108"><span style="font-size:12pt"><span style="font-family:&#039;Times New Roman&#039;,serif">1 điểm</span></span></td>
		</tr>
	</tbody>
</table>
<br  />
<span style="font-size:12pt"><span style="font-family:&#039;Times New Roman&#039;,serif"><b>Bài 3. (5 điểm)</b></span></span><br  />
&nbsp;
<table class="Table" style="border-collapse:collapse; border:solid windowtext 1.0pt">
	<tbody>
		<tr>
			<td style="border:solid windowtext 1.0pt; width:221.4pt; padding:0in 5.4pt 0in 5.4pt" valign="top" width="295"><span style="font-size:12pt"><span style="font-family:&#039;Times New Roman&#039;,serif"><b>Nhập vào</b></span></span></td>
			<td style="border:solid windowtext 1.0pt; width:193.5pt; border-left:none; padding:0in 5.4pt 0in 5.4pt" valign="top" width="258"><span style="font-size:12pt"><span style="font-family:&#039;Times New Roman&#039;,serif"><b>Xuất ra</b></span></span></td>
			<td style="border:solid windowtext 1.0pt; width:49.5pt; border-left:none; padding:0in 5.4pt 0in 5.4pt" valign="top" width="66"><span style="font-size:12pt"><span style="font-family:&#039;Times New Roman&#039;,serif"><b>Điểm</b></span></span></td>
		</tr>
		<tr>
			<td style="border:solid windowtext 1.0pt; width:221.4pt; border-top:none; padding:0in 5.4pt 0in 5.4pt" width="295"><span style="font-size:12pt"><span style="font-family:&#039;Times New Roman&#039;,serif">Nhập xâu bất kỳ: abacaaaadef</span></span></td>
			<td style="border-bottom:solid windowtext 1.0pt; width:193.5pt; border-top:none; border-left:none; border-right:solid windowtext 1.0pt; padding:0in 5.4pt 0in 5.4pt" width="258"><span style="font-size:12pt"><span style="font-family:&#039;Times New Roman&#039;,serif">Độ dài lớn nhất của xâu con: 4</span></span><br  />
			<span style="font-size:12pt"><span style="font-family:&#039;Times New Roman&#039;,serif">Xâu con dài nhất: aaaa</span></span></td>
			<td style="border-bottom:solid windowtext 1.0pt; width:49.5pt; border-top:none; border-left:none; border-right:solid windowtext 1.0pt; padding:0in 5.4pt 0in 5.4pt" width="66"><span style="font-size:12pt"><span style="font-family:&#039;Times New Roman&#039;,serif">1 điểm</span></span><br  />
			<span style="font-size:12pt"><span style="font-family:&#039;Times New Roman&#039;,serif">1 điểm</span></span></td>
		</tr>
		<tr>
			<td style="border:solid windowtext 1.0pt; width:221.4pt; border-top:none; padding:0in 5.4pt 0in 5.4pt" width="295"><span style="font-size:12pt"><span style="font-family:&#039;Times New Roman&#039;,serif">Nhập xâu bất kỳ: abcdef</span></span></td>
			<td style="border-bottom:solid windowtext 1.0pt; width:193.5pt; border-top:none; border-left:none; border-right:solid windowtext 1.0pt; padding:0in 5.4pt 0in 5.4pt" width="258"><span style="font-size:12pt"><span style="font-family:&#039;Times New Roman&#039;,serif">Độ dài lớn nhất của xâu con: 1</span></span><br  />
			<span style="font-size:12pt"><span style="font-family:&#039;Times New Roman&#039;,serif">Xâu con dài nhất: a</span></span></td>
			<td style="border-bottom:solid windowtext 1.0pt; width:49.5pt; border-top:none; border-left:none; border-right:solid windowtext 1.0pt; padding:0in 5.4pt 0in 5.4pt" width="66"><span style="font-size:12pt"><span style="font-family:&#039;Times New Roman&#039;,serif">1 điểm</span></span><br  />
			<span style="font-size:12pt"><span style="font-family:&#039;Times New Roman&#039;,serif">1 điểm</span></span></td>
		</tr>
		<tr>
			<td style="border:solid windowtext 1.0pt; width:221.4pt; border-top:none; padding:0in 5.4pt 0in 5.4pt" width="295"><span style="font-size:12pt"><span style="font-family:&#039;Times New Roman&#039;,serif">Nhập xâu bất kỳ: bcdef</span></span></td>
			<td style="border-bottom:solid windowtext 1.0pt; width:193.5pt; border-top:none; border-left:none; border-right:solid windowtext 1.0pt; padding:0in 5.4pt 0in 5.4pt" width="258"><span style="font-size:12pt"><span style="font-family:&#039;Times New Roman&#039;,serif">Không có xâu con dài nhất</span></span></td>
			<td style="border-bottom:solid windowtext 1.0pt; width:49.5pt; border-top:none; border-left:none; border-right:solid windowtext 1.0pt; padding:0in 5.4pt 0in 5.4pt" width="66"><span style="font-size:12pt"><span style="font-family:&#039;Times New Roman&#039;,serif">1 điểm</span></span></td>
		</tr>
	</tbody>
</table>
<br  />
<span style="font-size:12pt"><span style="font-family:&#039;Times New Roman&#039;,serif"><b>Bài 4. (5 điểm)</b></span></span><br  />
&nbsp;
<table class="Table" style="border-collapse:collapse; border:solid windowtext 1.0pt">
	<tbody>
		<tr>
			<td style="border:solid windowtext 1.0pt; width:167.4pt; padding:0in 5.4pt 0in 5.4pt" valign="top" width="223"><span style="font-size:12pt"><span style="font-family:&#039;Times New Roman&#039;,serif"><b>Nhập vào</b></span></span></td>
			<td style="border:solid windowtext 1.0pt; width:247.5pt; border-left:none; padding:0in 5.4pt 0in 5.4pt" valign="top" width="330"><span style="font-size:12pt"><span style="font-family:&#039;Times New Roman&#039;,serif"><b>Xuất ra</b></span></span></td>
			<td style="border:solid windowtext 1.0pt; width:49.5pt; border-left:none; padding:0in 5.4pt 0in 5.4pt" valign="top" width="66"><span style="font-size:12pt"><span style="font-family:&#039;Times New Roman&#039;,serif"><b>Điểm</b></span></span></td>
		</tr>
		<tr>
			<td style="border:solid windowtext 1.0pt; width:167.4pt; border-top:none; padding:0in 5.4pt 0in 5.4pt" width="223"><span style="font-size:12pt"><span style="font-family:&#039;Times New Roman&#039;,serif">Nhập mật khẩu: 123456aA</span></span></td>
			<td style="border-bottom:solid windowtext 1.0pt; width:247.5pt; border-top:none; border-left:none; border-right:solid windowtext 1.0pt; padding:0in 5.4pt 0in 5.4pt" width="330"><span style="font-size:12pt"><span style="font-family:&#039;Times New Roman&#039;,serif">Mật khẩu không an toàn!</span></span></td>
			<td style="border-bottom:solid windowtext 1.0pt; width:49.5pt; border-top:none; border-left:none; border-right:solid windowtext 1.0pt; padding:0in 5.4pt 0in 5.4pt" width="66"><span style="font-size:12pt"><span style="font-family:&#039;Times New Roman&#039;,serif">1 điểm</span></span></td>
		</tr>
		<tr>
			<td style="border:solid windowtext 1.0pt; width:167.4pt; border-top:none; padding:0in 5.4pt 0in 5.4pt" width="223"><span style="font-size:12pt"><span style="font-family:&#039;Times New Roman&#039;,serif">Nhập mật khẩu: 123456aA@</span></span><br  />
			&nbsp;</td>
			<td style="border-bottom:solid windowtext 1.0pt; width:247.5pt; border-top:none; border-left:none; border-right:solid windowtext 1.0pt; padding:0in 5.4pt 0in 5.4pt" width="330"><span style="font-size:12pt"><span style="font-family:&#039;Times New Roman&#039;,serif">Mật khẩu an toàn!</span></span><br  />
			<span style="font-size:12pt"><span style="font-family:&#039;Times New Roman&#039;,serif">Chuỗi mã hóa mật khẩu là: 123456bBA</span></span></td>
			<td style="border-bottom:solid windowtext 1.0pt; width:49.5pt; border-top:none; border-left:none; border-right:solid windowtext 1.0pt; padding:0in 5.4pt 0in 5.4pt" width="66"><span style="font-size:12pt"><span style="font-family:&#039;Times New Roman&#039;,serif">1 điểm</span></span><br  />
			<span style="font-size:12pt"><span style="font-family:&#039;Times New Roman&#039;,serif">1 điểm</span></span></td>
		</tr>
		<tr>
			<td style="border:solid windowtext 1.0pt; width:167.4pt; border-top:none; padding:0in 5.4pt 0in 5.4pt" width="223"><span style="font-size:12pt"><span style="font-family:&#039;Times New Roman&#039;,serif">Nhập mật khẩu: 246357aA#</span></span><br  />
			&nbsp;</td>
			<td style="border-bottom:solid windowtext 1.0pt; width:247.5pt; border-top:none; border-left:none; border-right:solid windowtext 1.0pt; padding:0in 5.4pt 0in 5.4pt" width="330"><span style="font-size:12pt"><span style="font-family:&#039;Times New Roman&#039;,serif">Mật khẩu an toàn!</span></span><br  />
			<span style="font-size:12pt"><span style="font-family:&#039;Times New Roman&#039;,serif">Chuỗi mã hóa mật khẩu là: 246357bB$</span></span></td>
			<td style="border-bottom:solid windowtext 1.0pt; width:49.5pt; border-top:none; border-left:none; border-right:solid windowtext 1.0pt; padding:0in 5.4pt 0in 5.4pt" width="66"><span style="font-size:12pt"><span style="font-family:&#039;Times New Roman&#039;,serif">1 điểm</span></span><br  />
			<span style="font-size:12pt"><span style="font-family:&#039;Times New Roman&#039;,serif">1 điểm</span></span></td>
		</tr>
	</tbody>
</table>
<br  />
<span style="font-size:12pt"><span style="font-family:&#039;Times New Roman&#039;,serif"><b>---------------------------HẾT--------------------------</b></span></span><br clear="all" style="page-break-before:always" />
<br  />
&nbsp;
		</div>
	</div>
	<div id="footer" class="clearfix">
		<div id="url">
			<strong>URL của bản tin này: </strong><a href="http://thptphuquoc.edu.vn/de-thi-hsg/de-thi-hsg-cap-truong-mon-tin-hoc-2018-203.html" title="Đề thi HSG cấp trường môn Tin học 2018">http://thptphuquoc.edu.vn/de-thi-hsg/de-thi-hsg-cap-truong-mon-tin-hoc-2018-203.html</a>

		</div>
		<div class="clear"></div>
		<div class="copyright">
			&copy; Trường THPT Phú Quốc
		</div>
		<div id="contact">
			<a href="mailto:webmaster@thptphuquoc.edu.vn">webmaster@thptphuquoc.edu.vn</a>
		</div>
	</div>
</div>
        <div id="timeoutsess" class="chromeframe">
            Bạn đã không sử dụng Site, <a onclick="timeoutsesscancel();" href="http://thptphuquoc.edu.vn/#">Bấm vào đây để duy trì trạng thái đăng nhập</a>. Thời gian chờ: <span id="secField"> 60 </span> giây
        </div>
        <div id="openidResult" class="nv-alert" style="display:none"></div>
        <div id="openidBt" data-result="" data-redirect=""></div>
<div id="run_cronjobs" style="visibility:hidden;display:none;"><img alt="" src="/index.php?second=cronjobs&amp;p=m62QXAez" width="1" height="1" /></div>
<script src="http://thptphuquoc.edu.vn/assets/js/jquery/jquery.min.js"></script>
<script>var nv_base_siteurl="/",nv_lang_data="vi",nv_lang_interface="vi",nv_name_variable="nv",nv_fc_variable="op",nv_lang_variable="language",nv_module_name="news",nv_func_name="savefile",nv_is_user=0, nv_my_ofs=7,nv_my_abbr="+07",nv_cookie_prefix="nv4c_t8851",nv_check_pass_mstime=1738000,nv_area_admin=0,nv_safemode=0,theme_responsive=1,nv_is_recaptcha=0;</script>
<script src="http://thptphuquoc.edu.vn/assets/js/language/vi.js"></script>
<script src="http://thptphuquoc.edu.vn/assets/js/global.js"></script>
<script src="http://thptphuquoc.edu.vn/themes/default/js/news.js"></script>
<script src="http://thptphuquoc.edu.vn/themes/default/js/main.js"></script>
<script src="http://thptphuquoc.edu.vn/themes/default/js/custom.js"></script>
<script type="application/ld+json">
        {
            "@context": "https://schema.org",
            "@type": "Organization",
            "url": "http://thptphuquoc.edu.vn",
            "logo": "http://thptphuquoc.edu.vn/uploads/baner.jpg"
        }
        </script>
<script src="http://thptphuquoc.edu.vn/themes/default/js/bootstrap.min.js"></script>
</body>
</html>