出门考试去……
Friday, 20. April 2007, 23:23:08
不知能否高高兴兴回家来?
在这个位面中。。。我是最强的。。。
Friday, 8. September 2006, 11:54:10
Program PKU2265; Const f:array[2..8,1..2]of integer=((0,1),(-1,1),(-1,0),(0,-1),(1,-1),(1,0),(0,1)); Var k,i,r:integer; p:integer; x,y:integer; f1,f2:text; Procedure Init; Var t:real; Begin Read(f1,k); t:=(-3+sqrt(12*k-3))/6; if abs(t-trunc(t))<=1e-10 then p:=trunc(t) else p:=trunc(t)+1; r:=k-(3*sqr(p-1)+3*(p-1)+1); End; Procedure Main; var t,q:integer; Begin t:=r; x:=p-1;y:=0; if t>0 then Begin inc(x,f[2,1]);inc(y,f[2,2]);dec(t);End; q:=p-1; While (t>0)and(q>0) do Begin dec(t);dec(q); inc(x,f[3,1]);inc(y,f[3,2]); End; for i:=4 to 8 do Begin q:=p; while (t>0)and(q>0) do Begin dec(t);dec(q); inc(x,f[i,1]);inc(y,f[i,2]); End; End; End; Procedure Print; Begin writeln(f2,x,' ',y); End; Begin assign(f1,'input.in'); assign(f2,'output.out'); reset(F1);rewrite(F2); Repeat Init; Main; Print; Until eof(f1); Close(f1);Close(F2); End.
Program PKU2507; const zero=1e-15; Var x,y,c:extended; f1,f2:text; ans:extended; Procedure Init; Begin read(f1,x,y,c); c:=1/c; End; Function Get(left,right:extended):extended; Var t,k,a,b:extended; Begin k:=(left+right)/2; a:=sqrt(sqr(x)-sqr(k)); b:=sqrt(sqr(y)-sqr(k)); t:=(a+b)/(a*b); if (abs(t-c)<zero)and(t-c>0) then Get:=k else if t-c<zero then Get:=Get(k,right) else if t-c>zero then Get:=Get(left,k); End; Function Get_Min(a,b:extended):extended; Begin if a>b then Get_Min:=b else get_min:=a; End; Procedure Print; Begin writeln(f2,ans:0:3); End; Begin assign(f1,''); assign(f2,''); reset(f1);rewrite(f2); Repeat Init; ans:=get(0,Get_Min(x,y)); Print; Until EOF(f1); close(f1);close(f2); End.
Thursday, 18. May 2006, 00:01:37
你的DND第一次PC给了什么职业?
Total: 4 votes
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
|
| ||||||
| 1 | 2 | 3 | 4 | 5 | ||
| 6 | 7 | 8 | 9 | 10 | 11 | 12 |
| 13 | 14 | 15 | 16 | 17 | 18 | 19 |
| 20 | 21 | 22 | 23 | 24 | 25 | 26 |
| 27 | 28 | 29 | 30 | 31 | ||