Coloring questions PASCAL

Updated on technology 2024-04-13
6 answers
  1. Anonymous users2024-02-07

    I don't know what the map looks like, but what about you.

    If you don't say it, then it could be like this:

  2. Anonymous users2024-02-06

    .It's called how people are.

    That's not all.

  3. Anonymous users2024-02-05

    vark:integer;

    zhi,neng,niu:array[1..1000] of integer;

    f1,f2:text;

    i,j,big,n:integer;

    beginassign(f1,''); reset(f1);

    readln(f1,k);

    for i:=1 to k do read(f1,zhi[i]);

    for i:=1 to k do read(f1,neng[i]);

    close(f1);

    for i:=1 to k do beginbig:=0;

    for j:=1 to k do

    if j<>i then

    if (zhi[i]>zhi[j])or(neng[i]>neng[j])

    then big:=big+1;

    if big=k-1 then niu[i]:=1;

    end;n:=0;

    for i:=1 to k do

    if niu[i]=1 then beginwriteln(i,'Cattle people');

    n:=n+1;

    end else writeln(i,'Non-cattle');

    writeln;

    writeln(n,'A cow man');

    assign(f2,''); rewrite(f2);

    writeln(f2,n);

    close(f2);

    end.

  4. Anonymous users2024-02-04

    This can be done with different tabs and base colors.

    The tabs should be bold, ASCII: 219 223

    Disadvantages:A grid can only have 2 colors.,And it shouldn't be used after making an exe (I haven't tried it).

  5. Anonymous users2024-02-03

    Pascal doesn't seem to support fill colors at the moment.

  6. Anonymous users2024-02-02

    10 5 is so small, breadth takes precedence traversal.

    upgrade---

    Well, to say that BFS is perfunctory to me. This is actually spfaThis question can actually be seen as graph theory.

    var k,t,x,y,head,tail:longint;

    queue,distant:array[1..100010]of longint;

    hash:array[1..100010]of boolean;

    beginfor i:=1 to 100010 dodistant[i]:=1000000;

    readln(x,y);

    distant[x]:=0;

    queue[1]:=x;

    hash[x]:=true;

    head:=0;

    tail:=1;

    repeat

    inc(head);

    hash[head]:=false;

    k:=distant[queue[head]];

    if(queue[head]=y)then beginwriteln(k);

    break;

    end;if(queue[head]>1)then begint:=queue[head]-1;

    if(distant[t]>k+1)then begindistant[t]:=k+1;

    if(not hash[t])then begininc(tail);

    queue[tail]:=t;

    hash[t]:=true;

    end;end;

    end;if(queue[head]<100000)then begint:=queue[head]+1;

    if(distant[t]>k+1)then begindistant[t]:=k+1;

    if(not hash[t])then begininc(tail);

    queue[tail]:=t;

    hash[t]:=true;

    end;end;

    end;if(queue[head]shl 1<=100000)then begin

    t:=queue[head]shl 1;

    if(distant[t]>k+1)then begindistant[t]:=k+1;

    if(not hash[t])then begininc(tail);

    queue[tail]:=t;

    hash[t]:=true;

    end;end;

    end;until head=tail;

    end.

Related questions
13 answers2024-04-13

It's not a problem that pascal can solve, it's not a panacea!!

13 answers2024-04-13

The author of "Fisherman's Song" is Zhang Zhihe, a poet of the Tang Dynasty. >>>More

16 answers2024-04-13

Both the eyedropper and the fill have been changed to 3D mode, with the eyedropper pressing and holding the left mouse button to select the eyedropper tool (you're now the 3D Material Eyedropper tool), and the fill and left mouse button to select the gradient tool or the paint bucket tool (you're now using the 3D Material Drag and Drop tool).

10 answers2024-04-13

1.Read in two data, A and B, and output them one by one. The first a b should refer to the divisibility of a b, and then the decimal division is the division with decimals, that is, the ordinary division. >>>More

3 answers2024-04-13

Strange indeed, the result of my experiment is that if the string variable is initialized first, the subscript can be used to read and write the string variable normally. >>>More