|
|
back to boardNo subject Почему в тесте 1 ответ 2. Re: No subject Well the answer is obviously 1. Apperently the authors of the problem lack the practical experience of putting things into holes :) But we could gratiously pardon them. After all they provided a clear example that allows us to get some insight of their understanding of the "putting things into holes" business. So we were provided with the opportunity to get this AC :) Re: No subject Probablty because stuff is rotated in SPACE :) Re: No subject Pascal AC Prog:) var a,t,n,i,k:integer; max:real; min:array[1..100] of real; begin readln(t,a); case t of 1: max:=2*a; {circle} 2: max:=a*sqrt(2); {rectangle} 3: max:=a; {triangle} end; readln(n); for i:=1 to n do begin readln(t,a); case t of 1: min[i]:=2*a; 2: min[i]:=a; 3: min[i]:=a*sqrt(3)/2; end; end; for i:=1 to n do if min[i]<=max then inc(k); writeln(k); end. |
|
|