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

Discussion of Problem 1025. Democracy in Danger

Why WA???
Posted by snipious 29 Jan 2005 15:56
const kmax = 101;
var n, n2, k, t, i, j: longint;
    a: array[1..kmax] of longint;
begin
     read(k);
     for i := 1 to k do
         read(a[i]);
     for i := 1 to k - 1 do
         for j := 1 to k - i do
             if a[j] > a[j + 1] then begin
                t := a[j];
                a[j] := a[j + 1];
                a[j + 1] := t;
             end;
     n := 0;
     for i := 1 to k div 2 + 1 do
         inc(n, a[i] div 2 + 1);
     write(n);
end.
Your code is AC, never post AC codes in future (-)
Posted by Victor Barinov (TNU) 29 Jan 2005 17:28
-