fZeo0z
06.07.2020 23:02

Объясните что тут надо делать ( у кого нет компьютера) Или лучше сделайте само задание ( у кого нет компьютера)


Объясните что тут надо делать ( у кого нет компьютера) Или лучше сделайте само задание ( у кого нет

Нажмите на рекламу ниже и сразу увидите ответ
Популярные вопросы:
Ответ:
Отличницааа5
12.01.2021 00:51
  present simple общие does he go to school every day? does she really like singing? is it cold today? do cats catch mice? has he got a real friend? альтернативные does she go to shool every day or once a month? do cats catch mice or dogs? is the earth round or square? is russia bigger or smaller than other countries? does he like skiing or skating? специальные what does he do at school every day? who likes dancing? when does winter come? where does she live? what does she always wait for? present progressive общие is it raining now? is the sun shining at the moment? is he writing his composition now? are they swimming in the pool at the moment? are you doing your homework? альтернативные are you doing your homework or watching tv now? is it raining or snowing now? are they flying to italy or to canada now? is he reading a book or a web-page? is she clever or not? специальные what is she looking forward for? where are they going to go next summer? when is he leaving for france? whom is she writing an e-mail? what are they doing now?
0,0(0 оценок)
Ответ:
васька58
19.01.2021 10:57

type

  base = record

     id: integer;

     ball: integer;

  end;

var

  t: text;

  a: array of array of integer;

  n: integer;

  st, tmp: string;

  err: integer := 1;

  database: base;

begin

  readln(n);

  setlength(a, n);

  for i: integer := low(a) to high(a) do

     setlength(a[i], 2);

  for i: integer := low(a) to high(a) do

  begin

     readln(st);

     tmp := st;

     delete(tmp, pos(' ', tmp, err), tmp.Length - pos(' ', tmp, err) + 1);

     database.id := strtoint(tmp);

     tmp := st;

     delete(tmp, 1, pos(' ', tmp, err));

     database.ball := strtoint(tmp);

     a[i, 0] := database.id;

     a[i, 1] := database.ball;

  end;

  var j: integer := 0;

  assign(t, 'output.txt');

  rewrite(t);

  while (j <= high(a)) do

  begin

     if (j + 1 < high(a)) and (a[j, 1] = a[j + 1, 1]) then

        if (a[j, 0] < a[j + 1, 0]) then begin

           write(t, inttostr(a[j, 0])); write(t, ' '); write(t, inttostr(a[j, 1])); writeln(t,'');

           write(t, inttostr(a[j + 1, 0])); write(t, ' '); write(t, inttostr(a[j + 1, 1])); writeln(t,'');

        end else begin

           write(t, inttostr(a[j + 1, 0])); write(t, ' '); write(t, inttostr(a[j + 1, 1])); writeln(t,'');

           write(t, inttostr(a[j, 0])); write(t, ' '); write(t, inttostr(a[j, 1])); writeln(t,'');

        end;

     if (j+1=n) then

        write(t, inttostr(a[j, 0])); write(t, ' '); write(t, inttostr(a[j, 1])); writeln(t,'');

     inc(j, 2);

  end;

  close(t);

end.

0,0(0 оценок)
Полный доступ
Позволит учиться лучше и быстрее. Неограниченный доступ к базе и ответам от экспертов и ai-bota Оформи подписку
logo
Начни делиться знаниями
Вход Регистрация
Что ты хочешь узнать?
Спроси ai-бота