|
|
back to boardCommon BoardWA Test #3 :( (Problem 1161) Help plz... Re: WA Test #3 :( (Problem 1161) 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) 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) oh, i really didn't understand it... thanx |
|
|