You are on page 1of 4

2012

1.
1.

2.

3.

4.

5.

2. (.. -2) x < 100,


.
:
. , , (
x < 0). , :




x
x >= 0 x < 10
""
_ x >= 10 x < 100
""
_ x >= 100 x < 1000
""
!
" "
_

3.
( < )
(C <> D)
(B >= D)
K1
_
_
_
4.
0
i 1 20
[i] mod 2 = 0
+1
[] A[i]
_
_
i 1 20
[i] mod 2 = 1
+1
[] A[i]
_
_
A5. 28

1. (. )


x
x < 0
" "
_ x < 10
""
_ x < 100
""
_ x < 1000
""
!
" "
_


x
x >= 0 x >= 1000
!
" "
_ x < 10
""
_ x < 100
""

""

2.

1
5
6
3
7

()



//, //
! ,
0
i 500

= i >= 1
[i] = " "
+ 1


_
ii-1
_
<> 0 ! 1

" 500 "


_

! ,
0
i 500
[i] = " "
!
+ 1
ii-1
_

1 500- ! 2
[] = " "
[] " "

! []
i1
pos 0
done 0
i <= 24 done =
[1, i] = []
pos i
done

i1
_
_ ! ,
[] [2, pos]
_
_
0
0
-1 ! ,
i 1 500- ! 3
[i] = " "
+ 1
>

_
0

+ 1
_
_
! !!!
+ 1
>

_
,



i 1 5 ! 1
[i]
j 1 7
[i, j]
_
_
i 1 5 ! 2
1 0
j 1 5
1 1 + [i, j]
_

2 0
j 6 7
2 2 + [i, j]
_
1 1 / 5
2 2 / 2
(2 1)/1 >= 10/100
[i]
_
_
! 3
i 1 5
0
j 2 7
[i, j] > [i, j 1]
+1
_
_
= 6
[i]

_
_
=
" "
_