,,,
:
- ;
- , ,
- MS Word ;
- MS Excel , ;
- VBA .
, MS Word, MS Exel, Visual Basic
.091400.01.1.01.05/147.
렠
.
..
1. .
2. .
2.1.
2.1.1. , ,
2.1.2.
2.1.3.
2.2. MS Word
2.2.1. , ,
2.2.2.
2.2.3.
2.2.4.
2.3. MS Excel
2.3.1. , ,
2.3.2.
2.3.3.
2.3.4.
2.3.4.
2.4. VBA
2.4.1. , ,
2.4.2.
2.4.3.
2.4.4.
2.4.5.
2.4.6.
3.
4.
1.
.
.
, , , .
2.
, .
2.1
, . , . 100 , 5- .
2.1.1 , ,
- .
- 10 .
-
.
2.1.2
10 .
2.1
2.1 . .
2.1.3
, .
2.2 MS Word
Microsoft Word , .
2.2.1 , ,
- Word.
- 14 , .
- , .
2.2.2
, (6. .pdf 104-116).
2.2.3
, .
3 1 (1,2)
2 1 (0,0,0) 2 (0,1,1)
1 0 0 0 1 (0,0) 0 1 (0,0)
0 0 0 0 0
3.4. ) , .
3 1 (1,2)
2 1 (0,0,0) 2 (0,1,1)
1 1(0,0) 0 1 (0,0) 0 0 0
0 0 0 0
2
3.4. ) , .
, , . ,
. , 1 , 0().
3.3.
, 5, . . , , , (n log n) n. , n , 2, . . . , n.
, , , 1.5. . 1.18 , a, b, c. , a b v , v a < b a b.
, , , . , , , , " ". , , .
3.1. 1 .
. h. , h , h - 1 .
3.4. , , log n!.
. ! \ , n! . 3.1 log n!.
. , , log >0 .
. , n >1
n!n(n-1)(n-2)()() ,
log n!(n/2)log(n/2)(n/4)log n n 4
n! (/), n(log log )= log 1,44n , .
3.4. (n log n)
, , log n, , , ( log ) . . 2.7. . , , , .
. 3.5, d. d-1. , . , , , , . .
3.3. . 3.5 . , , , .
. , . , . , , .
, [1] , [2i] A[2i+1] ( ) , [i].
3.5 .
, . 3.5
4 | 11 | 9 | 10 | 5 | 6 | 8 | 1 | 2 | 16 |
, , .
. , , (, , . 3.5).
, . , , , - , . , A[1] A[n], . , . , 1,2, ... , n1, , A[1] . , A[1] A[1] , 1,2 2 . .
3.4. . 3.5, , , .
16 | 11 | 9 | 10 | 5 | 6 | 8 | 1 | 2 | 4 |
. 3.6,. 16 . , 4 , . . 11.
4 10 5. 4, 4 10, . 4 1 2. 4 , .
3.6. 4 16
3.6; 16.
. 3.6,6. , 16 , .
-.
, 2, . . ., . , , . . A[i] = a,1in. , . . , : A[i]A[2i] 1 i n/2 A[i]A[2i+1] 1in/2. , , , . , , . h , , , , , - . h 1, . .
3.3.
. A[i], 1i n
. , , . .A[i]A[] 1<in.
. . i j , ; i.
procedure ((i,j):
1. if i - , i then begin
2. k i,
;
3. [i] [k];
4. (k,j)
5. end
j , , i . i > j/2, i , (i,j) , [i] .
, , :
procedure :
for i 1) st 1 until 1 do (i,n)
, 3.3 .
3.2. i+1, i+2, . . ., n , (i, ) i, i+1, . . ., .
. I.
, . . i=, , , 1, , ŭ (, ) .
, i , ( ). i (. . 2i=n) A[i]<A[2i], 3 [i] [2i]. 4 (2i, n); , 2i . i+1, i+2, . . . . . ., 2i 1, . A[i]>A[2i], i .
, i (. . 2i+1n) [2i] [2i+1] A [i], , , , , (i,n) i, i+1,..., n .
3.5. 3.3 .
. 3.2, i , i - i, 1in
(h) h. (h) (h 1)+ . , (h) (h).
3.3 , , . , , , . i , . , , , in/2, . O(n)
. , . [1] [n] A[1], [2], ..., [n - 1] . [1] [n - 1], A[1], [2], ..., [ - 2] . , . [1], [2], ..., [n] .
3.4.
. [i], 1in.
. , .
. , . . 3.3. :
begin
;
For in step -1 until 2 do
Begin
[1] [i];
(i,i - 1)
End end
3.6. 3.4 0(n log ).
. , m. , m ꠠ A[n-m+1], ..., [n] m , , A[1], ..., [n-m] . . (1, i) 0(log i)- , 3.4 (n log i ).
. O(nlog n)
3.5. (n log n)
. . , , n 1g n. , n2 , , , . , .
, . , , . , n .
, v . , , . , , , , i i- , d, - . . , 3.4.
3.7. , - , , , log n!.
. D () . D () , m . m, D(m)m log m.
, . . /=1, . , m, k. . k T k 1 i, 1ik. ,
D(T)=i+D(T)+(k-i)+D(T)
D ()
D(k)= [k+D(i)+D(k-1)]. (3.1)
,
D(k)k+[i log i+(k-i)log(k-i)] (3.2)
, i=k/2. , D(k)k+k log =k log k
, D (m)m log m m1.
, , n , /! . , \ 1/n! , 0. , 0. ' n! , 1/!. D(')n! log n!, ' ( , ) (1/n!) n! log n! = log n!.
. log n >0.
, , , n lg n ( ), . , .
Procedure (S):
1. if S then return S
else
begin a S;
2. S1, S2 S3 S,
, ;
3. return ((S1), S2, (S3))
end
3.7. .
3.5.
. S n a a2, ... , a.
. S, .
. . 3.7. (S).
3.8. 3.5. ( log ).
. 3.5 S. , , S . S1 S3, 3, , 4. (n) , n . , (0)=(1)=b b.
, , 2, 1- n S. 4 (i - 1) (n - i) . i 1 n, (S) cn ,
T(n)cn+[T(i-1)+T(n-1)] n2 (3.3)
(3.3)
T(n)cn+T(i) (3.4)
, n2 (n)<kn 1n n, k=2+2b b=(0)=T(1). (n=2) (2)2+2b (3.4). (3.4)
T(n)cn + + ki ln i (3.5)
i ln i , ,
i ln i x ln x dx (3.6)
(3.6) (3.5),
T(n)cn + + kn ln n -
n2 k=2+2b, n+4 b/nkn/2. , (n)kn 1n n (3.7).
, . "" 2 . , , , S. , (3.3). , , "-" , . , , , S, S , , . .
2 i, 1<i<|S| 1), i- S . S, . , , , S.
S S1, S2 S3? ( ) n . , S , A[f], A[f+1], ..., A[l] f l, 1<f<n. "" , S . , S1 A[f], A[f+1], ... A[k], S2S3 A[k+1], A[k+2], ..., A[l] k, fkl , , S2S3, Э S1 S2S3, .
-, S , i j.
1. begin
2. i f;
3. while ij do
begin
4. while A[i]> j>f do jj - 1;
5. while A[j]< il do ii + 1;
6. if < j then
begin
7. [i] A[j];
8. ii + 1;
9. ij -1
end
nd
nd
. 3.8. S S1 S2S3 .
i=f, A [f], ..., [i-1] S1. i=f, A[j+1], ..., A[l] S2S3. . 3.8.
A[f], ... A[i1], .. S1 A[j+1], ..., [1], .. S2S3. i=f S2S3 , . , . , , , .
3.5.
1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
6 | 9 | 3 | 1 | 2 | 7 | 1 | 8 | 3 |
=3. while- ( 4) j 9 7, A[9]=3 A[8]=8 , A[7]=1<. 5 i 1, A[1]=6. A[1] A [7], i=2, j=6 . 3.9, . , 39, . 3.9, . i>j, while-, 3, .
a)
1 | 9 | 3 | 1 | 2 | 7 | 6 | 8 | 3 |
i j
)
1 | 2 | 1 | 3 | 9 | 7 | 6 | 8 | 3 |
j i
. 3.9. .
2.2.4
, , .
2.3 MS Excel
MS Exel - , .
2.3.1 , ,
- MS Excel.
- .
.
2.3.2
Excel, , , , . , . .
2.3.3
excel, . exel , .
|
|
|
|
|
87934 | 150.5 | 16.10.1988 | ||
87967 | 151.0 | 13.05.1988 | ||
65477 | 143.5 | 03.07.1987 | ||
77685 | 155.5 | 04.05.1988 | ||
67545 | 120.5 | 12.07.1989 | ||
45654 | 160.0 | 01.07.1988 | ||
65465 | 130.0 | 23.12.1988 | ||
56765 | 110.0 | 25.11.1987 | ||
86985 | 123.5 | 19.10.1988 | ||
65365 | 143.0 | 25.10.1988 | ||
35676 | 150.0 | 13.05.1989 | ||
35686 | 147.0 | 18.08.1988 | ||
45676 | 159.5 | 23.11.1987 |
2.3.1 Excel, , , , .
|
|
|
|
|
56765 | 110.0 | 25.11.1987 | ||
67545 | 120.5 | 12.07.1989 | ||
86985 | 123.5 | 19.10.1988 | ||
65465 | 130.0 | 23.12.1988 | ||
65365 | 143.0 | 25.10.1988 | ||
65477 | 143.5 | 03.07.1987 | ||
35686 | 147.0 | 18.08.1988 | ||
35676 | 150.0 | 13.05.1989 | ||
87934 | 150.5 | 16.10.1988 | ||
87967 | 151.0 | 13.05.1988 | ||
77685 | 155.5 | 04.05.1988 | ||
45676 | 159.5 | 23.11.1987 | ||
45654 | 160.0 | 01.07.1988 |
2.3.2 excel , .
2.3.1 2.3.2 , 2.3.2.
2.3.4
Sub ()
'
' : Ctrl+w
'
Sheets("2").Select
Range("A1:E14").Sort Key1:=Range("C2"), Order1:=xlAscending, Header:= _
xlGuess, OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
End Sub
, Ctrl + w , .
2.3.4
, .
2.4 VISUAL BSIC
Visual Basic - Microsoft Worde. Microsoft Word, Microsoft Worde.
2.4.1 , ,
- VBA.
.
VBA.
2.4.2
. report.txt ( ), , Arial 14 .
2.4.3
. , enter, .
, .
2.4.4
Sub ()
'
'
'
'
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = " "
.Replacement.Text = _
" "
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
Selection.WholeStory
With Selection.Font
.Name = "Arial"
.Size = 14
.Bold = False
.Italic = False
.Underline = wdUnderlineNone
.UnderlineColor = wdColorAutomatic
.StrikeThrough = False
.DoubleStrikeThrough = False
.Outline = False
.Emboss = False
.Shadow = False
.Hidden = False
.SmallCaps = False
.AllCaps = False
.Color = wdColorAutomatic
.Engrave = False
.Superscript = False
.Subscript = False
.Spacing = 0
.Scaling = 100
.Position = 0
.Kerning = 0
.Animation = wdAnimationNone
End With
Selection.ParagraphFormat.Alignment = wdAlignParagraphJustify
End Sub
2.4.5
2.4 )
2.4 )
2.4 ) ) .
2.4.6
, VBA.
:
- ;
- , ,
- MS Word ;
- MS Excel , ;
- VBA .
1. .. . - .: , 1992. - 172 .
2. .. Microsoft Office XP: Word XP . - .: , 2004 - 288 .
3. .. Microsoft Office 2003. / . .. - .: , 2005 - 768 .
4. . Microsoft Office System 2003 / . c . . - .: , 2005 - 368 .
5. . Microsoft Office Excel 2003 / . c . .. - .: ; .: , 2005 224 .
: - ; -
Copyright (c) 2024 Stud-Baza.ru , , , .