- 守望者的逃离
- 2009-07-03 19:07:29 @
var M,S,T,Xs,Xt:int64;
procedure Init;
begin
readln(M,S,T);
Xs:=S; Xt:=T;
end;
procedure First;
begin
while (M>=10) and (T-1>=0) do begin
M:=M-10;
S:=S-60;
T:=T-1;
end;
end;
procedure Second;
begin
while (T>7) and (S>119) do begin
T:=T-7;
S:=S-120;
end;
end;
procedure Normal_Moving;
begin
S:=S-17;
T:=T-1;
end;
procedure Magic_Moving;
begin
S:=S-60;
end;
procedure Working;
var Lt,Ls,Lm:longint;
begin
First;
if T=0 then exit;
Second;
if T=0 then exit;
repeat
Lm:=M; Lt:=1;
repeat
Lm:=Lm+4;
inc(Lt);
until Lm>=10;
if (Lt*17>60) or (Lt>(S-1) div 17+1) or (Lt>T) then Normal_Moving else begin
T:=T-Lt;
Magic_Moving;
end;
until (T=0) or (S
1 条评论
-
尖端才子 LV 10 @ 2009-07-05 13:03:55
贪心……
Program escape;
var
m,s,t,mn,sn,tn:longint;
p:boolean;
begin
readln(m,s,t);
if s119) then begin tn:=tn+7;sn:=sn+120;p:=true;end;
2:if ((t-tn)>=3) and (s-sn>51) then begin tn:=tn+3;sn:=sn+60;m:=0;p:=true;end;
3:if ((t-tn)>=3) and (s-sn>51) then begin tn:=tn+3;sn:=sn+60;m:=1;p:=true;end;
4:if ((t-tn)>=3) and (s-sn>51) then begin tn:=tn+3;sn:=sn+60;m:=2;p:=true;end;
5:if ((t-tn)>=3) and (s-sn>51) then begin tn:=tn+3;sn:=sn+60;m:=3;p:=true;end;
6:if ((t-tn)>=2) and (s-sn>34) then begin tn:=tn+2;sn:=sn+60;m:=0;p:=true;end;
7:if ((t-tn)>=2) and (s-sn>34) then begin tn:=tn+2;sn:=sn+60;m:=1;p:=true;end;
8:if ((t-tn)>=2) and (s-sn>34) then begin tn:=tn+2;sn:=sn+60;m:=2;p:=true;end;
9:if ((t-tn)>=2) and (s-sn>34) then begin tn:=tn+2;sn:=sn+60;m:=3;p:=true;end;
end;
if not p then begin tn:=tn+1;sn:=sn+17;end;
end;
if (sn>=s) and (tn
- 1