Vous êtes sur la page 1sur 20

2013 . , 11 .

(2013 - 2 / 39)



2013



2013


2013 . , ,
, ,
2013 .
,
2013 .,

2013 .
.
,

, ,
, .
, ,

.
.

2013

2013 . , 11 .

(2013 - 3 / 39)



2013



235 . 3 ,
32 . 1,5 (90 )
1 2, 3.
1 13 (113).
, .
2 15 (115).
.
3 4 (14).
.
.
, .
.
,
.
, .
, ,
.
, .
, , .

.
!

2013

2013 . , 11 .

(2013 - 4 / 39)

.
1. ():
a) (, ) (, );
b) ( , ) /\
(, /\ ) & (, & );
c) ( , ) \/
(, \/ );
d) () (, );
e) (, A B). A B
, A B (
, );
f) 1 ( );
0 ( ).
2. , ,
(),
. , () \/
, \/ /\ ( ,
, = 1, = 0).
3. : (),
( ), ( ),
(), . , /\ \/ /\ D ,
(() /\ ) \/ ( /\ D).
/\ /\ ( /\ ) /\ .
: \/ \/ ( \/ ) \/ .
4.
,
.

2013

2013 . , 11 .

1
1
(113) ,
.
A1

A4

255?
1) 1

A2

2013 . , 11 .

(2013 - 5 / 39)

2) 2

3) 7

4) 8

A, B, C, D, E, F ,
. (
, .)
A

A
B

3
3

3
3

A3

2) 12

3) 13

1)
2)
3)
4)

4) 18

F.
x1
x2
x3
x4
x5
x6
1
1
0
1
1
1
1
0
1
0
1
1
0
1
0
1
1
0
F?
1)
2)
3)
4)

A5
x7
1
0
0

F
0
0
1

x1 /\ x2 /\ x3 /\ x4 /\ x5 /\ x6 /\ x7
x1 \/ x2 \/ x3 \/ x4 \/ x5 \/ x6 \/ x7
x1 /\ x2 /\ x3 /\ x4 /\ x5 /\ x6 /\ x7
x1 \/ x2 \/ x3 \/ x4 \/ x5 \/ x6 \/ x7

.
,
,
.
? ( )
.
* ()
, *
.
6 :
asc.wma
casting.wmv
last.wma
pasta.wmvx
pasta.wri
vast.wma
, 6
:
casting.wmv
last.wma
pasta.wmvx
vast.wma

A F ( ,
).
1) 11

?as*.wm?
*as?.wm*
?as*.wm*
?as*.w*

.
6 (
6, ).
.
1.
.
2.
( ).
. : 66, 43. : A, 9. : 9A.
,
.
1) 9F

2013

(2013 - 6 / 39)

2) 911

3) 42

4) 7A

2013

2013 . , 11 .

A6

. 2
.
ID 1.

..

ID
25
49
62
76
82
96
102
123
134

1)
2)
3)
4)
A7

1
_..
..
..
..
..
..
..
..
..
..

2013 . , 11 .

(2013 - 7 / 39)

2
ID_ ID_
25
134
76
49
76
123
82
76
82
96
102
76
102
96
134
49
134
123

..
..
..
..

A8

A10

1
2
3

2
4
7

3
= $A$2 + B$3
= A3 + B3

D1,
2?
: $ .
1)
2)
3)
4)

18
12
14
17

2013

3) 125

4) 175

11

10
10

: P = [2, 10] Q = [6, 14].


A,
( (x ) (x P) ) \/ (x Q)
, 1
.
1) [0, 3]

A11

2) 87

, , , ,
, ,
. :
00, 01, 100, 101, 110.
, -
? .
.
1)
2)
3)
4)

1
5
6

() .
48 000 ,
32 . 4 ,
, .
?
1) 44

A9

(2013 - 8 / 39)

2) [3, 11]

3) [11, 15]

4) [15, 17]

5
( 30 )
.

(

).
,
50 .
1)
2)
3)
4)

100
150
200
250

2013

2013 . , 11 .

2013 . , 11 .

(2013 - 9 / 39)

A13
A12 A
0 10. ,
,
, .

FOR i=0 TO 10
A(i)=i-1
NEXT i
FOR i=1 TO 10
A(i-1)=A(i)
NEXT i
A(10)=10

for i:=0 to 10 do
A[i]:=i-1;
for i:=1 to 10 do
A[i-1]:=A[i];
A[10]:=10;

for (i=0;i<=10;i++)
A[i]=i-1;
for (i=1;i<=10;i++)
A[i-1]=A[i];
A[10]=10;

i 0 10
A[i]:=i-1

i 1 10
A[i-1]:=A[i]

A[10]:=10


?
1)
2)
3)
4)

, ,

, ,
, ,

(2013 - 10 / 39)

,
, 4 - 4
.
-:


: , , , .
,
, .
4
, :




, .


1
2

1 ( ) 2 (
).
, ,
,
( 1)?

1) 8
2013

2) 12

3) 17

1
2
3
4
5
6
A

4) 21

2013

2013 . , 11 .

2
(115) ,
.
, 1
, , ,
.

.
B1

2013 . , 11 .

(2013 - 11 / 39)

B2

, :
1. 2,
2. 3.
2, .
, 21211
3
2
3
2
2,
1 19.
3 69,
5 , .
, .

(2013 - 12 / 39)

). .

a = 30
b = 14
a = a 2 * b
IF a > b THEN
c = b + 2 * a
ELSE
c = b - 2 * a
ENDIF

a := 30;
b := 14;
a := a
if a > b
c := b
else
c := b

a = 30;
b = 14;
a = a
if (a >
c = b
else
c = b

a := 30
b := 14
a := a 2 * b
a > b
c := b + 2 * a
c := b - 2 * a

2 * b;
b)
+ 2 * a;
- 2 * a;

2 * b;
then
+ 2 * a
- 2 * a;

: ___________________________.
B3

: ___________________________.

= (B1 A1)/2

= 2 A1/2

= (C1 A1)*2 4


C1,

A2 : 2
?
, ,
,
.

: ___________________________.
2013

2013

2013 . , 11 .

2013 . , 11 .

(2013 - 13 / 39)

,
. (, ,
. .) ,
( )?

F(n), n ,
:
F(1) = 1
F(n) = F(n1) * n, n >1
F(5)?
.

: ___________________________.

: ___________________________.

B6
B4

B5

(2013 - 14 / 39)

,
( ).

DIM N, S AS INTEGER
N = 0
S = 0
WHILE S <= 35
N = N + 1
S = S + 4
WEND
PRINT N

var n, s: integer;
begin
n := 0;
s := 0;
while s <= 35 do
begin
n := n + 1;
s := s + 4
end;
write(n)
end.

#include<stdio.h>
void main()
{
int n, s;
n = 0;
s = 0;
while (s <= 35)
{
n = n + 1;
s = s + 4;
}
printf("%d", n);
}

n, s
n := 0
s := 0
s <= 35
n := n + 1
s := s + 4

: ___________________________.

B7

3 5
0.
?
: ___________________________.

B8

. x,
: a b. x,
2, 21.

DIM X, A, B AS INTEGER
INPUT X
A=0: B=1
WHILE X > 0
A = A+1
B = B*(X MOD 10)
X = X \ 10
WEND
PRINT A
PRINT B

var x, a, b: integer;
begin
readln(x);
a:=0; b:=1;
while x>0 do
begin
a:=a+1;
b:=b*(x mod 10);
x:= x div 10
end;
writeln(a); write(b);
end.

#include<stdio.h>
void main()
{
int x, a, b;
scanf("%d", &x);
a=0; b=1;
while (x>0){
a=a+1;
b=b*(x%10);
x= x/10;
}
printf("%d\n%d", a, b);
}

x, a, b
x
a:=0; b:=1
x>0
a:=a+1
b:=b*mod(x,10)
x:=div(x,10)

a, , b

: ___________________________.
2013

2013

2013 . , 11 .

B9

, , , , , , , , , , .
,
. ?

B11

2013 . , 11 .

(2013 - 15 / 39)

: ___________________________.
B10

, :
220
;
20% ;
, , 5 ,
1 ?
, , ,
. , ,
.
, , 23 ,
23.
, ., . .
: ___________________________.

TCP/IP ,
, IP- ,
.
, IP-.
IP- .
IP- .
IP- :
217.19.128.131
:
255.255.192.0

IP-
, .
A
B
C
D
E
F
G
H
0
16
19
64
128
131
192
217
.
IP-: 192.168.128.0,
A
B
C
D
E
F
G
128
168
255
8
127
0
17
: HBAF

20
.
. , , .
. .

(2013 - 16 / 39)

H
192

: ___________________________.
B12


|,
&.

.

( )
3400
|
900
&
2100

( )
?
, ,
, ,
.
: ___________________________.

2013

2013

2013 . , 11 .

B13

B14

2013 . , 11 .

(2013 - 17 / 39)

, :
1. 1,
2. 2.
1 , .
.
, 3 23?

B15

(2013 - 18 / 39)


x1, x2, x3, x4, y1, y2 y3, y4,
?

: ___________________________.

(x1 x2) /\ (x2 x3) /\ (x3 x4) = 1


(y1 \/ y2) /\ (y2 \/ y3) /\ (y3 \/ y4) = 1
(y1 x1) /\ (y2 x2) /\ (y3 x3) /\ (y4 x4) = 1

,
(
).


x1, x2, x3, x4, y1, y2 y3, y4, .
.

DIM A, B, T, M, R AS INTEGER
A = -20: B = 20
M = A: R = F(A)
FOR T = A TO B
IF F(T) < R THEN
M = T
R = F(T)
ENDIF
NEXT T
PRINT M

var a,b,t,M,R :integer;


Function F(x:integer):integer;
begin
F := 3*(x-8)*(x-8)
end;
begin
a := -20; b := 20;
M := a; R := F(a);
for t := a to b do begin
if (F(t)<R) then begin
M := t;
R := F(t)
end
end;
write(M);
end.

: ___________________________.

FUNCTION F(x)
F = 3*(x-8)*(x-8)
END FUNCTION

#include<stdio.h>
int F(int x)
{
return 3*(x-8)*(x-8);
}
void main()
{
int a, b, t, M, R;
a = -20; b = 20;
M = a; R = F(a);
for (t=a; t<=b; t++){
if (F(t)<R) {
M = t; R = F(t);
}
}
printf("%d", M);
}

a, b, t, R, M
a := -20; b := 20
M := a; R := F(a)
t a b
F(t)< R

M := t; R := F(t)

F( x)

:= 3*(x-8)*(x-8)

1.

: ___________________________.
2013

2013

2013 . , 11 .

(2013 - 19 / 39)

3
(14)
2. (1, 2 . .),
. .
C1

,

(x )

D ( ).

.

INPUT x
IF x>=-3 THEN
IF x<=9 THEN
IF x>1 THEN
PRINT " "
ELSE
PRINT ""
ENDIF
ENDIF
ENDIF
END

var x: real;
begin
readln(x);
if x>=-3 then
if x<=9 then
if x>1 then
write(' ')
else
write('')
end.

void main(void)
{
float x;
scanf("%f",&x);
if(x>=-3)
if(x<=9)
if(x>1)
printf(" ");
else
printf("");
}

x
x
x>=-3
x<=9
x>1
' '

''

2013

2013 . , 11 .

(2013 - 20 / 39)

.
1. , ,
, (A, B, C, D
E). ( 3, 1, 5 9)
(B D ).

1
(x >= 3)

2
(x <= 9)

3
(x > 1)

A
B
C
D
E
, ; ,
; (), ;
., - ,
. ,
. ,
(). ,
, , ..
.
2. , ,
. ( ,
.)

2013

2013 . , 11 .

C2

30 .
0 100.
,
,
3. ,
, 3.
, .
, ,
. ,
.

2013 . , 11 .

(2013 - 21 / 39)

const
N=30;

var
N=30
a: array [1..N] of longint;
a[1:N]
i, j, p: longint;
i, j, p
begin
i 1 N
for i := 1 to N do
a[i]
readln(a[i]);

...

end.

N=30
DIM A(N) AS LONG
DIM I, J, P AS LONG
FOR I = 1 TO N
INPUT A(I)
NEXT I

#include <stdio.h>
#define N 30
void main(void){
long a[N];
long i, j, p;
for (i=0; i<N; i++)
scanf("%ld", &a[i]);

END

()
A 30 .
I, J, P.
1 30 A 1- 30-.

(
),
.
(
, Free Pascal 2.4) -.
2013

(2013 - 22 / 39)


, (, ,
).
C3

, , .
. , .

. , 15 ,
16 30 . , ,
.
,
22. , ,
, 22 .
S , 1 S 21.
, ,
.
,
,
.
. .
1. ) S,
. , S,
S.
) S,
,
. .
2. S,
,
,
, ,
.
S
.
3. S, :
,
,
,
.
S .
,
( ).
, , .

2013

2013 . , 11 .

C4

(2013 - 23 / 39)

,
.
N, 3,
1000; K,
10, 1000. N
:
<> < > < >,
<> , 20
; < > ,
( 00 23 2 ) ( 00
59 2 ); < > .
<> < >, < > <
> .
.
.

. ,
, .
(
, Borland Pascal 7.0),
(
).
, .
:
3
10
09:45 12:00
10:00 11:00
12:00 13:12
:
1
2
1

2013

2013 . , 11 .

(2013 - 24 / 39)


1
1 1 .
( ),
0 .

A1
A2
A3
A4
A5
A6
A7
A8
A9
A10
A11
A12
A13

4
2
1
3
4
3
1
1
1
2
3
2
4

2
2 1 ,
0 .

B1
B2
B3
B4
B5
B6
B7
B8
B9
B10
B11
B12
B13
B14
B15

11212
10
5
48
9
120
15
37
13
122
HCEA
2200
22
8
15

2013

2013 . , 11 .

(2013 - 25 / 39)

3

C1

,

(x )

D ( ).

.

INPUT x
IF x>=-3 THEN
IF x<=9 THEN
IF x>1 THEN
PRINT " "
ELSE
PRINT ""
ENDIF
ENDIF
ENDIF
END

var x: real;
begin
readln(x);
if x>=-3 then
if x<=9 then
if x>1 then
write(' ')
else
write('')
end.

void main(void)
{
float x;
scanf("%f",&x);
if(x>=-3)
if(x<=9)
if(x>1)
printf(" ");
else
printf("");
}

x
x
x>=-3
x<=9
x>1
' '

''

2013

2013 . , 11 .

(2013 - 26 / 39)

.
1. , ,
, (A, B, C, D
E). ( 3, 1, 5 9)
(B D ).

1
2
3

(x>= 3)
(x <= 9)
(x > 1)

A
B
C
D
E
, , ,
, (), ,
., - ,
. ,
. ,
(). ,
, , ..
.
2. , ,
. ( ,
.)

( , )

:
1.

1
2
(x >= 3) (x <=9)
A

3
(x>1)

2013

2013 . , 11 .

(2013 - 27 / 39)

2. ():
if (x>=-3) and (x<=1) or (x>=5) and (x<=9) then
write('')
else
write(' ')
.
:
if x>=-3 then
if x<=1 then
write('')
else
if x>=5 then
if x<=9 then
write('')
else
write(' ')
else
write(' ')
else
write(' ')
:
if abs(abs(x-3)-4)<=2 then
write('')
else
write(' ')

! .
1. .
2. .
3. , .

.
.
1. ,

.
2. ,

( ELSE).
ELSE
IF, IF
.
,
:
x,
2013

2013 . , 11 .

(2013 - 28 / 39)

, , .. ,
,
.
3.
( x>=5). , ,
.
,
( )
(||x3|4|2),
.
,
, ..
,
,
.
( )
,

(
, 1 (
),
( ),
).

(
, ). ,
x>=5 x>5
, ..
,
, (
),
. 1

(
)
(

,
)

3
2

2013

2013 . , 11 .

C2

(2013 - 29 / 39)

30 .
0 100.
,
,
3. ,
, 3.
, .
, ,
. ,
.

const
N=30;

var
N=30
a: array [1..N] of longint;
a[1:N]
i, j, p: longint;
i, j, p
begin
i 1 N
for i := 1 to N do
a[i]
readln(a[i]);

...

end.

N=30
DIM A(N) AS LONG
DIM I, J, P AS LONG
FOR I = 1 TO N
INPUT A(I)
NEXT I

#include <stdio.h>
#define N 30
void main(void){
long a[N];
long i, j, p;
for (i=0; i<N; i++)
scanf("%ld", &a[i]);

END

()
A 30 .
I, J, P.
1 30 A 1- 30-.

(
),
.
(
, Free Pascal 2.4) -.
2013

2013 . , 11 .

(2013 - 30 / 39)


, (, ,
).

( , )


p := 1;
for i := 1 to N do
if (a[i] mod 2<>0) and (a[i] mod 3=0) then
p := p * a[i];
writeln(p);

p := 1
i 1 N
mod(a[i],2)<>0 mod(a[i],3)=0

p := p * a[i]

p

P = 1
FOR I = 1 TO N
IF A(I) MOD 6=3 THEN
P = P * A(I)
ENDIF
NEXT I
PRINT P

p=1;
for (i=0; i<N; i++)
if (a[i]%2!=0 && a[i]%3==0)
p*=a[i];
printf("%ld", p);

P , 1.
1- 30-
2 3. 2 0
3 0,
P ,
6 3 (. ).
P. .
P
2013

2013 . , 11 .

2013 . , 11 .

(2013 - 31 / 39)

, .
2
,
. ,
,

.
,
,

. ,
,


1
.
1.
P (,
, 0).
2. .
3. ,
.
4. 3.
5. 3 ,
.
6.
.
7.
(, p := a[i]).
8. .
9. ,
.
10.
.
11. (,
while) .
12.
, . 112, ,
0


2

2013

C3

(2013 - 32 / 39)

, , .
. , .

. , 15 ,
16 30 . , ,
.
,
22. , ,
, 22 .
S , 1 S 21.
, ,
.
,
,
.
. .
4. ) S,
. , S,
S.
) S,
,
. .
5. S,
,
,
, ,
.
S
.
6. S, :
,
,
,
.
S .
,
( ).
, , .

2013

2013 . , 11 .

(2013 - 33 / 39)


( , )

1. ) , S =11, , 21.
.
S , 21
.
) ( ),
S =10 .
11 20 .
.
2. S: 5 9. , ,
. 10
. . 1. ,
( ), , ( ,
) .
3. S: 8. 9
16 . 16 ,
. , 9 ,
. 2. , (
), .

. ( ) .
(
).
..

1-
(
)

8+1 =9


1- 2-
2-
(
(
( )

)
)
9+1=10

8*2=16

: +1

10+1=11

11*2=22

10*2=20

20*2=40

16*2=32

: +1

: +1

11

: *2

20

16

: *2

22>>

10

8
: *2

: *2

: *2

40>>

32>>

.1. , .
>> , .
2013

2013 . , 11 .

(2013 - 34 / 39)


3 .
.
( . ).
, ,
,
,
.
,
) ). )
, ,
,
. ) ,
,
, .. ,
,
.
,
: ()
, , ()
,
, ,
,
. ,
.
,
, ,
, ,
, , ,
.
, ,
, ,
. ,
, ,
, ,
, , ,
.
,

.
.
,
(. )

2013

2013 . , 11 .

(2013 - 35 / 39)

, 3 ,
.
1. 3 .
2. .
3. ;
2 3 S
, 3 2 ,
.
1. .
2.
S
.
3.
S.
4.
S
, 3, 2
1

C4

2013 . , 11 .

(2013 - 36 / 39)

:
3
10
09:45 12:00
10:00 11:00
12:00 13:12
:
1
2
1


( , )

0
3

,
.
N, 3,
1000; K,
10, 1000. N
:
<> < > < >,
<> , 20
; < > ,
( 00 23 2 ) ( 00
59 2 ); < > .
<> < >, < > <
> .
.
.

. ,
, .
(
, Borland Pascal 7.0),
(
).
, .

2013

,
,
.
,
,
.
. ,
.
, ,
.

2013

2013 . , 11 .

(2013 - 37 / 39)

2013 . , 11 .

(2013 - 38 / 39)

var p:array[1..1000] of integer;


c,c1:char;
i,j,N,K:integer;
name:string;
time1,time2:integer;
begin
readln(N,K);
for i:=1 to K do
p[i]:=0;
for i:=1 to N do
begin
name:='';
repeat
read(c);
name:=name+c
until c=' '; { }
read(c,c1); { }
time1:=60*((ord(c)-ord('0'))*10+ ord(c1)-ord('0'));
read(c,c,c1); { , }
time1:=time1+(ord(c)-ord('0'))*10+ord(c1)-ord('0');
read(,c,c1); { }
time2:=60*((ord(c)-ord('0'))*10+ ord(c1)-ord('0'));
readln(c,c,c1); { , }
time2:=time2+(ord(c)-ord('0'))*10+ord(c1)-ord('0');
for j:=1 to K do
if p[j]<=time1 then
begin
p[j]:=time2;
writeln(name,' ',j);
break;
end;
end;
end.

DIM p(1000) AS INTEGER


DIM s AS STRING
DIM nm AS STRING
INPUT n
INPUT k
FOR i = 1 TO k
p(i) = 0
NEXT i
FOR j = 1 TO n
LINE INPUT s
c$ = MID$(s, 1, 1)
i = 1
WHILE NOT (c$ = " ")
i = i + 1
c$ = MID$(s, i, 1)
WEND
nm = MID$(s, 1, i)
time1 = (ASC(MID$(s, i + 1, 1)) - ASC("0")) * 60 * 10
time1 = time1 + (ASC(MID$(s, i + 2, 1)) - ASC("0")) * 60
time1 = time1 + (ASC(MID$(s, i + 4, 1)) - ASC("0")) * 10
time1 = time1 + (ASC(MID$(s, i + 5, 1)) - ASC("0"))
time2 = (ASC(MID$(s, i + 7, 1)) - ASC("0")) * 60 * 10
time2 = time2 + (ASC(MID$(s, i + 8, 1)) - ASC("0")) * 60
time2 = time2 + (ASC(MID$(s, i + 10, 1)) - ASC("0")) * 10
time2 = time2 + (ASC(MID$(s, i + 11, 1)) - ASC("0"))
FOR i = 1 TO k
IF time1 >= p(i) THEN
p(i) = time2
PRINT nm, i
GOTO 10
ENDIF
NEXT i
10 NEXT j
END

, ..
4
,
.
.
:
;
;
;

.
: ;
, ;
2013

2013

2013 . , 11 .

(2013 - 39 / 39)

,


, , ,
;
,
,

.
, -
( < >, or and ..).
, .
.
,
,
, .
,
.
,

2013

3
2

Vous aimerez peut-être aussi