|
|
back to boardCommon BoardWho can help me?What do the "Ep" and "Dp" mean in Problem 1088? Posted by Cain 9 Jun 2001 18:55 Re: Who can help me? --> they are the nearest leave of magic stone and Ayla > But what's wrong with this one? I think my comprehesion isn't wrong Posted by Cain 11 Jun 2001 12:11 const maxn = 100; var a,b : array[0..maxn]of longint; ans,i,j,D,E,F,DP,EP,H : longint; begin readln(D,E,F,DP,EP,H); for i:=1 to D do begin DP:=DP div 2; a[i]:=DP; end; for i:=1 to E do begin EP:=EP div 2; b[i]:=EP; end; i:=1;j:=1; while (i<=D)and(j<=E) do begin if a[i]>b[j] then inc(i) else if b[j]>a[i] then inc(j) else begin ans:=i+j-2;break; end; end; if ans<=H then writeln('YES') else writeln('NO'); end. |
|
|