nnnrrr i tltang, toi da; lBh/lthang... Tinh chi6u ddi.[r]
(1)HQI THI TIN HQC TRE IAN rutJ xvfl - BAC rffi,u zors
DE CHINH THTIC
on rHr rHUc HANH - voNG riNn sANc c - KHor rRUNG Hec pu6 rndNc
Ngny thiz lll7l.20l5
Thdi gian: 150 philt (kh6ng kA thoi gian phdt dA)
trET
b6o danh:
Noi luu bii thi Tfp tin lhm bii Dii liQu viro K6t qui
Tlii sinh tao thu rnuc lh 56 bao danh
cua rninh trOn may
Bail.pas Bai2.pas Bai3.pas Inputl.inp Input2.inp Input3.inp Outputl.inp Output2.inp Output3.inp
Biri 1: (a tli6m)
Cho bdn cd vua vu6ng NxN (2 < N < 10) c6 cdcky hiQu ddng ld c6c s6 vir
circky hiOu cdt ld c6c chfl c6i (a, b, c, d, e, f, g, h, i) nhu hinh vi du du6i dAy
1 (2 tli6m) Em hdy dflt rrrQt md vdo I vi trf NGAU NHIEN tr6n bin cd vd
tinh todn dC dua ratdt cit chc nu6'c di k6 titip cta rn6 Vi dg:
- Input.inp: 6 a3 Input.inp: 7 d3
o a J I
- Output.inp: bl b5 c2 c4 - Output.inp:b2 b4 cI c5 el e5 f2 f4
2 (l tli6m) Ern h5y dat ti6p I con t6t vdo vi tri NGAU NHIEN tr6n bdn co vir
x6c dinh xem t6t c6 bf mE [n hay kh6ng X (5n), O (kh6ng an) Vf dp: - Input.inp:6 a3 b5
- Output.inp: bl b5 c2 c4 x
3 (1 tli6m) Trudng ho p kh6ng 6n dugc
NGAN NHAT dO an duoc t6t Vi du: - Input.inp:1 d3 dl
- Output.inp:b2 b4
- Output.inp:b2 b4
- Input.inp: 7 d3 dl
- Output.inp:b2 b4 cl c5 e1 e5 f2 f4
o
con t6t, em hdy tim ra MQT duong di
(2)tli6m)
Gi6 sri ern ld rnQt l4p trinh vi6n, c6 nguoi thu€ em vitit t phAn mdm dua c6ch sri
dung di6n rg ctlen trong gla gia cnnh dinh vor vdi chi phf chr phi thAp nhAt th0p nhOt trong I thring.th6ng
Qua tirn hi6u vd phan tich ernnhan th6y cAn ph6n ra2 ih6mthi6t bi di6n:
Nhom 1: phAi sri dung thudng xuy6n (bong ddn, ti vi, n6i com di6n, tri Ia1h, )
Nh6m 2:.sri dung.h6rg thuong xuyon (bdn ld (bdn rii), m6y glf;t, m6y diOu hod) Do d6 dtl gi6rn tOi da chi phf cAn ph6i sri dung hi6u qua-.Z" initft-tri di6n thu6c
nh6rn
Cu th6: Nhd 6ng Nguy6n V[n A c6 t6ng.s6 thi6t bi di6n v6i di6n n[ng tiOu rhp (xdt diOu kiQn ti6u chuAn, loai b6 c6c y6u iO t na.y ta'
+ 3 b6ng ddn n6-6ng 1m2 60w (dung 3hl1ngdy), 2 bong ddn 5w (dung
Thllngiry), I b6ng den 15w (dung th/lngdy), I tivi 32- 55w (dung gh/lngdy), 16i
com diOn 750w.(dnng 0,Sh/lngdy), tri lanh t50lit 125w (dung 24h/lngiry) + T6ng s6 di6n ndng ti0u thg ld khodng: 66,74 - 6TKWhlt th6ng
- Nh6rn 2:
+ I rn6y giat 750W - dirng khoAng 1,33h ti0u thu lKWh; sri' dUng tOl thiOu Ofrlt th6ng; t6i rla l8h/1 th6ng
+ 1 bdn ti 1.000W - dung khoing lh ti0u thu lKWh; sri dpng t6i thiOu 8h/1 thring;tOi aa 30h/1 th6ng
+ 1 rn6y di6u hod 1.000W - dung kho6ng lh tiOu thu lKWh; sri'dung tOi ttritlu
g}hll thrlng; tOi da 24oh/t thSng
Bing don di
Di0n nlng ti6u thu KWh) Don gi6 (VND)
Bflc 1:0 - 50 BQc 2: 5l - 100
BAc 3: l0l - 200
1.484
1.533
t.186
Kh5'ch hdng rnu6n sri dung cric thitit bi di6n bing c6ch tdng dAn rnric ti6u thu
+ ^ - )
diOtr cta may di6u hod (d€n rmic t6i da trdi nong bri'c) vd tdnglgihm thiAt bi
lai nhung v5n ddrn b6o mric diOn n[ng tiOu thu kh6ng vucrt qu6 B4c (200KWh) Vi
du:
Mdv eiat Bdn ti Ei0u hod C6 dinh Thav d6i T6ng s6
18h/1,33 30h/1 90h/1 67I(Wh 133KWh 20OKwh
18h/1.33 29hlt 9thtl 67KWh 133KWh 20OKwh
1 8h/ 1,3 28hlr 92hlt 67KWh r33KWh 20OKwh
1 8h/ 1,3 8h/1 tt2hll 67KWh 133KWh 20OKwh
l6h/1,33 8h/1 1 3hl1 67KWh l33KWh 20OKwh
l4h/1,33 8h/1 Lr4hlt 67KWh 133KWh 200KWh
Y u cffu: Ern hdy l6p trinh cho l<h6ch hdng vdi dt' li6u d nh6rn 2 vd, daara k6t
qui dC kh6ch hdng chon rnri'c ti6u thu cho gia dinh rninh:
In
800 900 1000
1,25
1,1 I
10 18
830
90 240
(3)l8ll,25 30/l,ll
thu lKWh: 1000/1000 : lh, toi thieu: glh/I toi da 240Wlt,
Bhi 3: (3 tli6m)
Cho I hinh vu6ng NxN (3 < N <20)
Nh0p ngau nhi6n cdc s6 0, vdo c6c ri,, dudng rli ngin nh6t ai qua ciic s6 I tu
g6c dudi b6n trrii dt5n g6c rr6n b6n phAi
Chri v:
Crich tti: c6 th0 di qua ph6i, rli l6n ho4c di ch6o M5i buoc di c6ng tt Orn t,AEtOAu ta o
- Truong hqp g6c du6'i bOn tr6i ho4c g_6c tr6n bOn ph6i la s6 hodc kh6ng
dud'ng di thi xuat ra: I(HONG TIM THAY ) Vi du:
0 1 0 I
1 0 0 1 1 0
0 0 1 1 1
0 I 0 0 I
I 0 0 1 0
1 0 I 0 0
1 0 0 0 1 1 1
0 0 1 0 1
1 0 0 1 1 0
1 0 I 0 1 1 I
0 0 I 0 0 1
0 0 0 0 1 0
1 0 0 0 0
:KHONG TIM THAY
7 (Mal Siat; 800W, thoi gian tieu thu lKWh; t000/800: 1,25h, toi
thieu:
(4)T THI TIN HQC TRE ON rrrr THU C HANH _ VONC riNrr
rAN rrrtl xvrr _ BAC I,rcu zols nANG C - KHOI.TRUNG HoC PHo ru6Nc
OT crriNH THUC Thdi gian; 150 Ngiy philt thi: (kh6ng lll712015kA thdi gian phdt di)
Biri 1: 1l AiOm;
Cho bin co vua vu6ng NxN (2 < N < 10) c6 cdc ky hiQu ddng ld c6c s6 vd c6c ky hi6u cQt ld c6c cht c6i (a,b, c, d, e, f, g, h, i) nhu hinh vi du dudi d6y
l (2 tli6m) Em h6y dat mOt tuong vdo vi tri NGAU NHIEN tren bdn cd vd
tinh toan dti dua ratdt ch cdc nudc Ai tC ti0p cta tugng Vi dp:
- Input.inp: 6 a3 - Input.inp: 7 d3
-output.inp:b2 b4 cl c5 d6 - output.inp: a6 bl b5 c2 c4 e2 e4 fl f5
96
2 (1 tli6m) Em h6y dat titip I con tdt vdo I vi trf NGAU NHIEN tr6n bdn cd vir
xric dinh xem tdt co bi tugng dn hay kh6ng X (6n), o (kh6ng an) vi dp:
!-1 (1 tli6m) Truong hgrp khpng |n dugc- tdt, em h6y tim MeT ducrng di NGAN NHAT de an duoc ttit Ntiu t6t roi vdo diem chtit (mdu xrim hinh
vi du trOn) kh6ng c6 dudmg tli il6 an thi xu6t KHoNG TIM TFtAy vi du:
- Input.inp:6 a3 b4 - Output.inp: b2 b4 cl
x
- Input.inp:7 d3
- Output.inp: a6
- Output.inp: a6
- Input.inp:1 d3 d5
c5 d6 - Output.inp: a6 bl b5 c2 c4 e2 e4 fl f5 96
o
96 O c4 d5 Ho4c 96Oe4d5 d5
bl b5 c2 c4 e2 e4 fI f5
b1 b5 c2 c4 e2 e4 fl f5
Ncri luu bei thi Tfp tin lim bdi Dii liQu viro Kiit qui Thi sinh t4o thu muc ld SO Uao
danh cria minh tr6n m6y
Bail.pas
Bai2.pas Bai3.pas
Inputl.inp
Input2.inp Input3.inp
Outputl.inp
Output2.inp Output3.inp
e
c
a
6
2
1
X
x
x
A x
(5)2: (3 eli6m) 500.000 200.000 100.000 50.000 20.000 10.000 Input.inp Output.inp 100 200 500 1.000 2.000 5.000 3.s00.000 -7 -0 -0 -0 -0 -0 276.s00.000 Input.inp Output.inp 200 100 500 s.000 r.000 r0.000 5.250.000 -10 -1 -0 -1 -0 -0 304.750.000 Input.inp Output.inp 100 200 500 1.000 1.000 1.000 3.10s.000 BAN NHAP SAI SO TIEN
- c?ng nghQ thdng tin ngdy duoc ring dpng r6t nhicu mgi ho4t rlQng cria
doi s6ng xd hdi; d6c biOt rd v6i c6c em aa hqc [ua ng6n ngr l[p trinh thi viQc x6y dung mQt phAn mAm phuc vs ld ili6u dcrn gian.vi au, ?9 ilrric rriqn u,.p tint toiin vd dua ra-s6 ti6n rhing o iac thi:ng mdy ATM, .6 .rn ,b.tnc xdy dpg m6t chuong trinh
don gi6n nhu sau:
- Nh{p sO to ti6n hiQn c6 mriy ATM Vi dp: MQnh gi6 (d6ng) S6 tO
100 200 500 1.000 2.000 5.000
- Khi ngudi ddn d6n rrit tidn, .mri1 aT$ se
.y6u cAu nhap so tion cin nit (hoac
chon s5 tiOn theo mric) s6 ticn nh4p t6i thic; iooooar"g
theo thri tu uu ti6n tiOn c6 mQnh gi6 lcrn nh6t tru6c, htit nfitlp mQnh gi6thi.p hcrn .t o iong ro ,i3,
"tu "a"mOnh
cAn nit cria nguoi d6n YAu cdu;
cho ddy sii m Mt sd cia 100 tuong rirng v6i m€nh gid tiin nha ffan
Ntlu s6 ti6n nh4p vdo kh6ng lA b6i s6 cria
TIEN
10000 thi xu6t B{N NHAP SAI So
N5u ld bOi s6 cira 10000 thi ki6m tra sO ddn thung ATM xem dri d6, trekh6ng N6u kh6ng rhi thi xudtraXIN LOI QUY KHACH, HIEN ATM KHONG DU TIEN.
Ntiu dri thi xu6t nhu vi du sau:
Bii 3: (3 tli6m)
Cho I hinh vu6ng NxN (3 < N <20).
- Nh0p ngSu nhi6n c6c s6 0, vdo ciic Tim ducrng di ngin nh6t rli qua c6c s5 g6c du6i bOn trrii dtin g6c tr6n b6n ph6i
Chri f:
- C6ch di: c6 th6 di qua ph6i, di l0n hoac di ch6o - MOi budc di cQng th6m t,bitdAu ld b
(6)g6c dudi ton tr6i ho4c g6c tr6n b€n phii ld sti hoflc kh6ng c6 xudt ra: KHONG TIM THAY.
0 I 0 1 I
I 0 0 1 0
0 0 1 I I
0 1 0 0 I
I 0 0 I I 0
I 0 I 0 0
I 0 0 0 I 1
0 0 I I 0 I I
1 I 0 0 I 1 0
1 0 I 0 I 1 I
0 0 I I 0 0 I
0 0 0 0 I 0
1 0 1 0 I 0 0
(7)THAy-TIN HOC TRE
XVII - BAC LIEU 2015
TOn:
Th{ sinh tqo tha ntqrc ld t6 bdo danh cila minh, ldm bdi vd luu vdi t€n tdp tin
ld.bait.pas, bai2.pas, baij.pas vdo thu tnqc t6 bdo danh vila tao Vf dU thf sinh co
t6 bdo danh 807 thi tqo tha muc 807 ,6i lr* bail.pas, bai2.pas, baij.pas vdo thu mqc 807
Bhi 1: (a tli6m)
C6c ern hdy vi5t chuong trinh liet kO c6c cht c6i chi co mflt vin bin dirng m6t lAn theo thir tu cria bdng cht c6i (kh6ng phAn bi6t cht hoa vd chir thuong),
do4n vdn bin kh6ng d6u duoc nhflp tir bdn phim d9 dei kh6ng ry6255 ky tU
Goi y: Str dung hDrm upcase vd lowercase Freepascat aC AOi chfr hoa vA
cht thuong Vi du:
NhAp tir bin phim XuAt min hinh
Nsay hoi tin hoc ac y Tin Hoc Tre Bac Lieu abhlnoru
Bdi 2z (3 tli6m)
Ddy s6 h4nh phirc ducyc dinh nghia nhu sau:
Ddy s6 nguy€n duong a,ta,2 , 8,, duoc ggi Id ddy sri h nh philc n6u n6 tho6
-.:
man cac oleu Kren sau:
- Ld d6y s6 gi6m dAn x
- Voi mdi a; v6i i >1 thi a; hoflc ld s6 nguy6n t6 hoic ld u6c c[ra m6t c6c
sO tir a1 d6n a;-1
C6c ern hey lap trinh nhflp tir bdn phim sO nguy6n duong X < 500 sau dua md.n hinh day s6 hanh phirc ddi nhAt b t dAu ti'X.
OB TTTT THIIC HANH VONG TiNTT
nANc B - Kr{or rRUr{G Hec co so
Ngiry thi: lll7l20l5
Thdi gian; 120 pluit (kh6ng kA thdi gian phdt di)
V6i X: 5;
Vcri X: B;
Ddys6hanhphtic:5 3 21
Ddysiihqnhphilc:8 7 21
b6o danh:
(8)) mQt m6ng s6 nguy6n co n phdn tu'v6'i n <: 100 li6u cria rnAng dugc doc tu tAp tin vdn b6n data.inp
"o cAu trfc nhu sau: - Dong dAu ghi gi6 tri s6 phAn tu m6ng
- Ddng ti6p theo ld gi5 tri cfra c6c ph6n tu thir I d6n phAn til thri n
C6c em hey lap trinh doc dir 1i6u cua ming tu tAp tin data.inp dd cho vi sip x6p
rnAng c6 giittri tdng dAn, k5t qu6 ghi ratQp tin v6n b6n v6i t6n data.out c6 c6u tnic nhu sau:
- Ddng dAu ghi gi6tr1s6 phAn tri ming.
- Ddng ti6p theo li gi5 tri cria c6c ph6n tri duo c sdp x6p tdng dAn
Vids:
data.inp data.out
5
9 67 3 34679
ut5t
(9)TIN HQC TRE
XVII _ BAC LIT.U 2OT5
Ngdy thi: lll7l20l5
ON CTTINH THUC Thdi gian: 120 ptuit (kh6ng k€ thdt gian phdt
di)
Thi sinh tgo thu muc ld sti bdo danh ct)a_minh, ldm bdi vd lru v6i ftn
tQp tin h.,la!1
rys, bai2,pTs, bot3.potidoil *, ,6 bdo danh v*a tqo vi du thf sinh co
s6 bdo danh B0z thi tqo thamqtc B0z
r6i'trru bail.pas, bai2.pas, bai3.pas vdo thu muc 807
Biri 1: (a tli6m)
c6c em hdy vitlt chucrng trinh fiet ke c6c ch& c6i chi
c6.mpt van bin dung mQt rdn theo thir tu clla b6ng chu cii
$n6ng phan biQt chir hou ,i chir thulng), dopn vdn b6n kh6ng d6u duqJnhap tu bin prrirr, Jo
ddi kh6ng qu6255ky tu. .no?#ulr*lri dpng hdm upcat ud to* ** il;s r purIui Ja i5i .i*"r,""
"a Vi ds:
Bdi 2: (3 tli6m)
,h,i:;l,Fibonaci ld ddy g6m c6c s5: I , t,2,3, 5, 8, dugc x6c dinh bdi c6ng
kh63ffiff, bi6, d[';k#:l'*;tL:'f Hi,]ir,ang cra it nhdtc6c s5 Fibonaci Du lidu vio: Nhqp tt bAn phfm sd N
[N < 1000)
Dir li0u ra: Xudt mdn t irt,
Vf du:
tir bin phfm XuAt ra man
ninn Hoi thi tin- t o.lG tint
Bac LiEu 2015 ablru
(10)Bii 3: (3 tli6m)
Cho m6t mAng s6 nguy€n c6 n phAn tt vdi n <: 100
Dir 1i6u cria m6ng dugc.doc.ttr t6p tin vdn b6n data.inp c6 c6u truc nhu sau: - Ddng dAu ghi gidtri s6 phAn triironl m6ng
- Ddng thf i trong n ddng ti6p theo ld gi5 tr.i cria c5c phAn tt thf 1 d5n phAn tri thri n
C6c em hay lap trinh doc dfr li6u cria m6ng tir tap tin data.inp dd cho vd sip x6p mAng co giStri gi6m dAn, kt5t quA ghi tQp tin vdn bin v6i t6n data.out c6
"fi 1.,1
nhu sau:
- Dong dAu ghi gi|tri s6 phAn tt trong m6ng
r X
- Ddng thri i trong n dong ti6p theo ld gi6 tricria c6c phAn tu duoc ,ap r6p gi6m oan
Vids:
data.inp data.out
5 5
9 9
6 7
7 6
a
J 4
2 2
(11)
TIN HQC TRE oB rnr rntlc HANH
sAxc l - rcrdr rrnu Hec
I'{gdy.thi: I I/7/20I5
Thd'i gian: 90 pldt (kh6ng k€ thdi gian phdt d€)
{H BAC LIEU
E CHfNII THU
Tlt[ sinh ehi :
Bii 1 (5 tli6m) Biri lhm tlugc luu v6'i t6n li BLl
\
O Qudng trubng Bac Li6u co bi6u tuo.ng dAn t6c ( nhu hinh rn6u) ( 4 )
Y\u ciu:
- Ding phAn m6m PowePoint vd Paint em hdy vE lai bi6u
tugng d6
- Dung PowePoint trinh chi6u c6c hinh theo trinh tu sau:
- Khi click chu6t lAn il6u ti6n sE xu6t hi6n 6nh bOn phAi
- Khi click chu6t l6rn2 sE xu6t hipn 6nh gita.
- Khi click chu6t lAn xu6t hi6n Anh b6n tr6i
- Khi click chuQt lAn thri 4 xudt hi6n hinh t6ng thti (nhu
hinh m6u)
(Chfi !,: AAi vA'i hinh cd ttiQu rbrtg trinh tti6n khtic rthou)
Bni 2 (2 tli6m) Dring phAn -6- so?n thfro v5n bin d6 trinh biy ldi giii, lu'u v6'i t6n BL2.
MQt d6m ruOng hinh cht nhAt c6 chi6u ddi gAp lAn chiAu rQng Tinh chi6u ddi
, ,1
vd chi6u r6ng d6rn ru6ng d6 bi6t chu vi d6rn ru6ng ld 4Bm U()
Bii 3 (3 tli6m) Tu c6c ph6p tinh du6i dAy thi chQu + hfi + ndi: bao nhi6u?
++:24
B
+
25
B
(12)HQC TRE IH BAC LIEU
B cniNn rnrl
DE THI THUC HANH sANc a - rcr6r rrnu Hec
Nsdy thi:1 l/7/2015
Thdi gian: 90 philt (kh6ng k€ thdi gian phtu dA) Tlt[ sinlt glti :
S6 Oao danh: 0.40
Ilinh ntdu
Bii 2 (3 di6 ilng phf,n mdm so?n thfro vin bin d6 trinh biy ld'i gi6i, Iu,u
v6'i t6n BLz.
M6t l5o nhd gidu vta keo kiQt lai vira tham lam, m6t hdm vdo rtng tinh co
gap mQt 6ng But, 16o liiin than phi6n v6i But trdng minh rAt nghdo kh6 6ng Br;td6
bi6t r6t rd v6 I5o nhung v5n n6i .irg: "T6i c6 th6 giup anh, cir m5i lan anh nh6m ,nit ve md m8t thi s6 ti6n anh dang c6 sE tlng gAp d6i, nhrmg sau d6 anh ph6i
dua t6i 24 d6ng, n6u bdng ldng t6i sE girip anh!" LEo nhd gidu kh6ng .4, suynghi,
bang long nhu th6 Nhung tr6 tr6u sau khi l5o nhem mit va rno m6t duo c lAn thi
th6y trii cria rninh kh6ng d6ng ndo Em hey giirp cho mgi nguoi cung bi5t hic diu 15o nhir gidu keo ki6t co bao nhi6u ti6n?
Bei 3 (2 tli6m) C6 thri b5nh va tr6i cAy dugc c6n bing nhu hinh tr6n Vay di6n th6 ndo vdo ddu ? dO duoc cAn bdng
^*-7'\' -***
*-;**
., t:l :
Ho vd tAn
Bhi 1 (5 cli6m) Bii lhm
O Qudng trudng Bac Li6u c6 bi6u tugng d6n tQc ( nhu hinh m6u) Y€u cdu:
- Dung phAn md- PowePoint vd Paint em hdy vE l4i bi6u
tugng d6
- Dirng PowePoint trinh chi6u cdc hinh theo trinh tu sau:
- Khi click chu6t lAn dAu ti6n sE xuAt hi6n 6nh b6n tr6i - Khi click chu6t l6rn2 sE xuAt hi6n 6nh gita.
- Khi click chuQt ldn xu6t hi6n 6nh b6n phii.
- Khi click chu6t lAn xu6t hi6n hinh t6ng th6 (nhu hinh
rnAu)