ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Common Board

WA Test #3 :( (Problem 1161)
Posted by Denis Vlasov 1 Oct 2005 19:01
Help plz...
Re: WA Test #3 :( (Problem 1161)
Posted by Denis Vlasov 1 Oct 2005 19:36
Here is my code:

var a : array [1..101] of longint;
    n, i, j : longint;
    t, max : extended;
begin
   readln(n);
   for i := 1 to n do
      readln(a[i]);
   for i := 1 to n do
      for j := i+1 to n do
         begin
            t := 2 * sqrt(a[i]*a[j]);
            if t>max then max := t;
         end;
   writeln(max:0:2);
end.
Re: WA Test #3 :( (Problem 1161)
Posted by Burunduk1 1 Oct 2005 23:07
Probably you don't understand the problem.
There are N stripies.
They collide until only one left.
We should minimize its weight.
Example:
72,30,50 -> 120,30 -> 120
Re: WA Test #3 :( (Problem 1161)
Posted by Denis Vlasov 2 Oct 2005 02:33
oh, i really didn't understand it... thanx