⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ac1036.pas

📁 同济大学 Online在线题库 AC源代码合集 程序设计竞赛必看资料
💻 PAS
字号:
program tju1036;
const
  maxcount=1528;
var
  q:array[0..maxcount]of qword;
  p1,p2,p3,f1,f2,f3,r,i:integer;
  a,b,c:qword;
begin
  repeat
    read(p1,p2,p3,i);
    if p1>p2 then begin r:=p1;p1:=p2;p2:=r;end;
    if p1>p3 then begin r:=p1;p1:=p3;p3:=r;end;
    if p2>p3 then begin r:=p2;p2:=p3;p3:=r;end;
    f1:=0;f2:=0;f3:=0;r:=0;a:=p1;b:=p2;c:=p3;
    repeat
      if (a<=b) and (a<=c) then begin
        if a>q[r] then begin inc(r);q[r]:=a;end;inc(f1);a:=q[f1]*p1;
      end
      else if b<=c then begin
        if b>q[r] then begin inc(r);q[r]:=b;end;inc(f2);b:=q[f2]*p2;
      end
      else begin
        if c>q[r] then begin inc(r);q[r]:=c;end;inc(f3);c:=q[f3]*p3;
      end;
    until r=i;
    writeln(q[i]);
  until seekeof;
end.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -