DenNewLen38
22.09.2022 10:15

1.Assume 0.1% of the runtime of a program is not parallelizable. We are using supercomputer, which
consists of 3,120,000 cores. Under the assumption that
the program runs at the same speed on all of those cores,
and there are no additional overheads, what is the parallel
speedun on 30. 30.000 and 3.000.000 cores? B=0.001

2. The total time to execute a program is set to 1. The non-parallelizable part of the programs is 40% which out of a total time of 1 is equal to 0.4. The execution time of the program with a parallelization factor of 2 (2 threads or CPUs executing the parallelizable part) would be:

!‼️‼️‼️

Нажмите на рекламу ниже и сразу увидите ответ
Популярные вопросы:
Ответ:
kannoesubaru37
03.08.2021 21:58

var i,s,p:integer; a:array [1..100] of integer;

begin 

s:=0; p:=0;

writeln('Vvedite masiv a:'); 

for i:=1 to 10 do begin

write('a[',i,']=');

readln(a[i]);

end;

for i:=1 to 10 do begin

if a[i]>0 then s:=s+a[i]; 

end;

s:=s*2;

writeln('Udvoennaya suma polozhitelnih elementov=',s);

writeln('Indexi elementov kotorie bolshe prediduschego:');

writeln;

for i:=2 to 10 do begin

if a[i]>a[i-1] then write(i,', ');

end;

for i:=2 to 10 do begin

if ((a[i]>=0) and (a[i-1]>=0)) or ((a[i]<0) and (a[i-1]<0)) then p:=p+1;

end;

writeln;

if p>0 then writeln('Masiv imeet pari sosednih elementov s odnakovimi znakami') else  writeln('Masiv ne imeet pari sosednih elementov s odnakovimi znakami'); 

readln(s);

end. 

 

0,0(0 оценок)
Ответ:
feruza1111
22.05.2022 21:53

1)

var

a,b:array [1..100] of integer;

i,j,k,a,b,f:integer;

begin

randomize;

readln(a);

readln(b);

k:=0;

for i:=1 to 20 do

begin

a[i]:=random(135)-45;

f:=0;

for j:=a to b do

if (a[i]=j) and (a[i] mod 7 =0) then f:=1;

if f=0 then

begin

k:=k+1;

b[k]:=a[i];

end;

end;

for i:=1 to k do

writeln(b[i]);

end.

2)

var

a,b:array [1..100] of integer;

i,j,k:integer;

begin

randomize;

readln(k);

j:=0;

for i:=1 to 20 do

begin

a[i]:=random(135)-45;

writeln(a[i]);

for i:=1 to 19 do

begin

if a[i]*a[i+1]>0 then

begin

j:=j+1;

b[j]:=a[i];

j:=j+1;

b[j]:=k;

end

else

begin

j:=j+1;

b[j]:=a[i];

end;

end;

j:=j+1;

b[j]:=a[20];

for i:=1 to j do

writeln(b[j]);

 

3)

var

a,b:array [1..20] of integer;

i,j,k1,k2:integer;

begin

randomize;

readln(k1);

readln(k2);

if k1<k2 then

begin

for i:=1 to 20 do

begin

a[i]:=random(135)-45;

writeln(a[i]);

end;

for i:=1 to k1-1 do

b[i]:=a[i];

for i:=k2+1 to 20 do

b[i]:=a[i];

j:=k2;

for i:=k1 to k2 do

begin

b[j]:=a[i];

j:=j-1;

end;

for i:=1 to 20 do

writeln(b[i]);

end;

end.

 

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