Алгоритмизация и программирование (решение заданий части 3 ЕГЭ)

  • Published on
    02-Jan-2016

  • View
    47

  • Download
    1

Embed Size (px)

DESCRIPTION

( 3 ). , ..., 6 .., 2010 . : , . - PowerPoint PPT Presentation

Transcript

  • ( 3 ) , ..., 6 ..,2010 .

  • : , . 1155 560 350 175 5-11 :

  • 11 32 48% . : : 8-9 20 . - 11 . : 30% 3 , 14% 0 . 1% , .

  • : . 2, 3, 4 . 10. . , ( ).

  • ( , ..) . . . . . . . ( - ) .

  • , (, - , ). . . . . , .

  • : : 3 : 30 . 1 : . . . .: AND OR.

  • 1. :

    , ax=b . , , 0. .

    : a b, ., , .

  • :

    var a,b,x: real;beginreadln(a,b);if a0 then writeln(b/a:0:2)else if b0 then writeln(x )else writeln( )end.1) , : a=0, b=5. - , .

  • 2) :

    var a,b,x: real;beginreadln(a,b);if a0 then writeln(b/a:0:2)else if b=0 then writeln(x )else writeln( )end.

  • 2. :

    , , A(x, y) , . ( ). .

  • :

    x y, ., , ., , AND OR

  • :var x,y: real;beginreadln(x,y);if x
  • 1) , : x=1, y=0.5. . .

  • 2) :var x,y: real;begin readln(x,y); if x
  • 3) :

    var x,y: real;beginreadln(x,y);if (x

  • : : 2 : 30 . 2 : ; ; ; ; ; ; ; ( ); ..

  • :

    , ; , A[i] A () i; : for i:=1 to N do begin { - A[i] } end;

  • , N ( ).

    i , 1 N 1, .

  • ( ) .

    A, A[i,k] , i k.

    (, ) ; , i M , , k: for k:=1 to M do begin { - A[i,k] } end;

  • (, ) ; , k N , , i:

    for i:=1 to N do begin

    { - A[i,k] }

    end;

  • 1. :

    50 , , , . .

    : , , . min1, min2, max1, max2. , , .

  • Const n=50; var c:array [1..n] of integer; max1, max2, min1, min2, i: integer; begin for i:=1 to n do readln(c[i]); max1:=c[1]; max2:=c[1]; min1:=c[1]; min2:=c[1]; for i:= 2 to n do begin { } if c[i]>max1 then begin max2:=max1; max1:=c[i]; end elseif c[i] > max2 then max2:=c[i];

    { } if c[i] max1*max2 thenwrite(min1, ,min2)else write(max2, ,max1);readln;end.

  • 2. : - 30 .:1) ; , , : 1 1 2 2 1 1 1 1 3 3 2 22) 4- ( );3) : ( ) ( kMax);

  • 4) ( ) : , , kMax, kMax;5) , - ( k), , : 1 1 2 2 1 1 1 1 3 3 2 2 k 1 2 1 2 1 2 3 4 1 2 1 2 kmax 1 2 2 2 2 2 3 4 4 4 4 46) : , k ; : , k , 1 ( , , );

  • 7) , ; , ( ); k kMax , ( ) ;

    8) : , k kMax, . , , k; k > kMax, kMax k. kMax .

  • Const N =30;var A: array[1..N] of integer; i, k, kMax: integer;beginfor i:=1 to N do readln(A[i]); { }k := 1; { A[1] }kMax := 1; for i:=2 to N do begin { A[2]...A[N] } if A[i] = A[i-1] then { } k := k + 1 else k := 1; { } if k > kMax then kMax := k;end;writeln(kMax);end.

  • 3. : 30 :1) Max, Min Sum, , .

    2) . SM SA real .

  • 3) : , Max. , Max. Min. , Min.

    4) Max Min, SM.

    5) SA . SM - SA. :

  • Const N=30; var A:array [1..N] of integer; Max, Min, Sum, I: integer; SM, SA: real; begin Max:= A[1]; Min:= A[1]; Sum:= A[1]; for I:= 2 to N do begin readln(A[i]); Sum:= Sum + A[i]; if A[i] > Max then Max:= A[i] else if A[i] < Min then Min:= A[i];end; SM:= (Max + Min)/2; SA:= Sum/N; writeln(SM - SA); end.

  • 4. : 10 10 , .: Max Min . : . , . , max . , , min . min max.

  • Const N=10;var a: array [1..N; 1..N] of integer; i, j, Max,Min: integer; begin for i:=1 to N dofor j:=1 to N doreadln (a[i, j]); { }Min:=a[1,2]; Max:=a[1,2];{ :} for i:=1 to N-1 do for j:=i+1 to N do begin if a[i,j]>Max then Max:=a[i,j]; if a[i,j]
  • Const N=10;var A: array [1..N; 1..N] of integer; i, k, Max,Min: integer; begin for i:=1 to N dofor k:=1 to N doreadln (a[i, k]); { }Min:=a[1,2]; Max:=a[1,2];{ :} for i:=1 to N-1 do for k:=i+1 to N do begin if a[i,k]>Max then Max:=a[i,k]; if a[i,k]
  • Const M=7; N=5;var A: array [1..M; 1..N] of integer; i,k,S : integer;Begin S:=0; For i :=1 to M do For k := 1 to N do begin readln(A[i,k]); S:=S+A[i,k]; end; Writeln (=, S);end. 5. : M N .

  • Const M=7; N=5;var A: array [1..M; 1..N] of integer; i,k,S : integer;Begin For i :=1 to M do For k := 1 to N do readln(A[i,k]); For i := 1 to M do begin S:=0; For k := 1 to N do S:=S+A[i,k]; Writeln (=, S); end;end. 6. : M N .

  • Const M=7; N=5;var A: array [1..M; 1..N] of integer; i,k,S : integer;Begin For i := 1 to M do begin S:=0; For k := 1 to N do begin readln(A[i,k]); S:=S+A[i,k]; end; Writeln (=, S); end;end. 6. : M N .

  • : () ; ; - ; ( ); ( ); ; , ; ( , , () ).

  • : : 4 : 60 . 4 :assign ;reset ;rewrite ;ppend ;close ;eof , ;eoln ;SeekEof , , ;SeekEoln , , ;read (readln) ;write (writeln) ;

  • record ( , record) , ; . record; : : 1993

    var person: record fio: string; g: integer; p: charend;

  • :

    , , , ; , , , , , .

  • :

    , x.name name x :var Info: array[1..100] of record name: string; code: integer; end; 100 , Info ; nme code; k Info[k].name Info[k].code

  • 1. :

    A[1...500] of char. . P[..] of integer , . . N

  • Const N=500;var a:array [1..N] of char; p:array[A..] of integer;i,M: integer; c:char;begin readln(M);for c:= to do p[c]:=0;for i:=1 to M do begin read(a[i]);if a[i] in [A..,..] then begin c:=upcase(a[i]); p[c]:=p[c]+1; end; end;for c:= to do writeln(c, - ,p[c])end.

  • 2. :, . , 255 . . .: ().readln(s); s:=s+ ; max:=0; k:=0;for i:=1 to length(s) dobegin if s[i] then k:=k+1elsebegin if k>max then max:=k; k:=0;end;end;writeln(max); end.

  • 3. : 11- . N. : - , 20 ; - , 15 ; - ; - , , ., , , . , 11 , , 4,5.

  • var p:record name: string; sum: integer;end; c: char; b: boolean; N, m, k, i: integer;begin readln(N); for i:=1 to N do begin p.name:=; repeat {} read(c); p.name:=p.name+; until c:= ; repeat {} read(c); p.name:=p.name+; until c:= ;

    repeatread(c); { } until c:= ; p.sum:=0; b:=true;{ , 2 3}k:=0;{ 4 5} while not eoln do begin read(m); if m in [2,3] then b:=false else begin p.sum:=p.sum+m; k:=k+1 end; end; if b and (p.sum>4.5*k) and (c:=) then writeln(p.name); end;end.

  • 4. :

    N. N , , : < > < > < >. .

    , (), .

  • var s: array[1..99] of integer;{ i- } n,i,sn,min: integer;{sn - , . - } c:char;{ : , }begin for i := 1 to 99 do s[i] := 0; readln(n); for i := 1 to n do begin repeat read(c); until c =' ';{ } repeat read(c); until c =' ';{ } readln(sn); { } s[sn]:=s[sn] + 1; end;

    min := n; for i := 1 to 99 do if (s[i]0)and(s[i]

  • ( ): , , ; , , , , ;, , ;, ; , , ;

  • : (, );, ( ) ; , , ; , (, ) ;, begin-end, ; , ;

  • :

    (, ), ; , ; , ; , .

  • : , ; , ..; :1) , ;2) ( ); , ; ;

  • : (, ) ; ; < >, or and; , , div mod ; begin-end; for (); while repeat , - ;

  • :

    ( , , ; ): 4, ; 3 ; 2 ; 1 .

  • : http://www1.ege.edu.ru :1. .. , 2006 .2. .3. . ., ..4. .., ? ( . ). : 1. 2004-2009 .2... . : . : , 2009.3. .., .. : . .: , 2009.4. .., .. -2010: : . .: , 2009.

Recommended

View more >