Submission #3717240


Source Code Expand

var
  even,odd,n,i,j:longint;
  a:array[0..1000] of longint;
begin
  readln(n);
  for i:=1 to n do read(a[i]);
  for i:=1 to n-1 do
   for j:=i+1 to n do
    if a[i]<a[j] then begin a[0]:=a[i];a[i]:=a[j];a[j]:=a[0]; end;
  for i:=1 to n do
   if i mod 2=0 then even:=even+a[i]
                else odd:=odd+a[i];
  if even>odd then write(even)
              else write(odd);
end.

Submission Info

Submission Time
Task A - カードと兄妹
User luogu_bot1
Language Pascal (FPC 2.6.2)
Score 0
Code Size 379 Byte
Status WA
Exec Time 3 ms
Memory 128 KB

Compile Error

/usr/bin/ld.bfd: warning: ./link.res contains output sections; did you forget -T?

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 0 / 100
Status
WA × 2
WA × 13
Set Name Test Cases
Sample sample-01.txt, sample-02.txt
All 01-01.txt, 01-02.txt, 01-03.txt, 01-04.txt, 01-05.txt, 01-06.txt, 01-07.txt, 01-08.txt, 01-09.txt, 01-10.txt, 01-11.txt, sample-01.txt, sample-02.txt
Case Name Status Exec Time Memory
01-01.txt WA 0 ms 128 KB
01-02.txt WA 0 ms 128 KB
01-03.txt WA 0 ms 128 KB
01-04.txt WA 0 ms 128 KB
01-05.txt WA 0 ms 128 KB
01-06.txt WA 0 ms 128 KB
01-07.txt WA 3 ms 128 KB
01-08.txt WA 3 ms 128 KB
01-09.txt WA 1 ms 128 KB
01-10.txt WA 1 ms 128 KB
01-11.txt WA 1 ms 128 KB
sample-01.txt WA 0 ms 128 KB
sample-02.txt WA 0 ms 128 KB