#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int n;
  scanf("%d", &n);
  int num[100];
  int i = 0;
  int j = n - 1;
  int odd[n];
  int juan = i;
  for (; juan < n; i++) {
    scanf("%d", &num[i]);
    if (num[i] % 2 != 0) {
      odd[juan] = num[i];
      juan++;
    }
  }
  i = 0;
  int result;
  do {
    result = odd[i] - odd[j];
    printf("%d\n", result);
    j--;
    i++;
  } while (i < n / 2);
  if (n % 2 != 0)
    printf("%d\n", odd[n / 2]);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1d0,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xec7(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
movl   $0x0,-0x1a4(%rbp)
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x1a8(%rbp)
mov    -0x8(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0x1b0(%rbp)
lea    0xf(,%rax,4),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x1c8(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x1b8(%rbp)
mov    -0x1a4(%rbp),%eax
mov    %eax,-0x1bc(%rbp)
mov    -0x1bc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    122a <main+0x10a>
movslq -0x1a4(%rbp),%rax
lea    -0x1a0(%rbp),%rsi
shl    $0x2,%rax
add    %rax,%rsi
lea    0xe41(%rip),%rdi
call   1040 <scanf@plt>
movslq -0x1a4(%rbp),%rax
mov    -0x1a0(%rbp,%rax,4),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
je     1211 <main+0xf1>
mov    -0x1c8(%rbp),%rax
movslq -0x1a4(%rbp),%rcx
mov    -0x1a0(%rbp,%rcx,4),%edx
movslq -0x1bc(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x1bc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1bc(%rbp)
jmp    1216 <main+0xf6>
mov    -0x1a4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1a4(%rbp)
jmp    1194 <main+0x74>
movl   $0x0,-0x1a4(%rbp)
mov    -0x1c8(%rbp),%rcx
movslq -0x1a4(%rbp),%rax
mov    (%rcx,%rax,4),%eax
movslq -0x1a8(%rbp),%rdx
sub    (%rcx,%rdx,4),%eax
mov    %eax,-0x1c0(%rbp)
mov    -0x1c0(%rbp),%esi
lea    0xda1(%rip),%rdi
call   1030 <printf@plt>
mov    -0x1a8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x1a8(%rbp)
mov    -0x1a4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1a4(%rbp)
mov    -0x1a4(%rbp),%eax
mov    %eax,-0x1cc(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x1cc(%rbp),%eax
cmp    %ecx,%eax
jl     1234 <main+0x114>
mov    -0x8(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
je     12e6 <main+0x1c6>
mov    -0x8(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x1c8(%rbp),%rax
movslq %ecx,%rcx
mov    (%rax,%rcx,4),%esi
lea    0xd22(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x1b0(%rbp),%rax
mov    %rax,%rsp
mov    -0x4(%rbp),%eax
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x1a8,%rsp
lea    0xec5(%rip),%rdi
lea    -0x2c(%rbp),%rsi
call   1040 <scanf@plt>
mov    %rsp,-0x38(%rbp)
mov    -0x2c(%rbp),%eax
movslq %eax,%r13
mov    %rsp,%r12
lea    0xf(,%rax,4),%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%r12
mov    %r12,%rsp
cmpl   $0x0,-0x2c(%rbp)
jle    11a8 <main+0x88>
xor    %r15d,%r15d
lea    -0x1d0(%rbp),%rbx
lea    0xe86(%rip),%r14
jmp    118a <main+0x6a>
nopl   0x0(%rax)
add    $0x4,%rbx
cmp    -0x2c(%rbp),%r15d
jge    11a8 <main+0x88>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <scanf@plt>
mov    (%rbx),%eax
test   $0x1,%al
je     1180 <main+0x60>
movslq %r15d,%r15
mov    %eax,(%r12,%r15,4)
add    $0x1,%r15d
jmp    1180 <main+0x60>
add    $0xffffffffffffffff,%r13
xor    %ebx,%ebx
lea    0xe4e(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nop
mov    (%r12,%rbx,4),%esi
sub    (%r12,%r13,4),%esi
mov    %r14,%rdi
call   1030 <printf@plt>
add    $0x1,%rbx
mov    -0x2c(%rbp),%eax
mov    %eax,%ecx
shr    $0x1f,%ecx
add    %eax,%ecx
sar    %ecx
movslq %ecx,%rcx
add    $0xffffffffffffffff,%r13
cmp    %rcx,%rbx
jl     11c0 <main+0xa0>
test   $0x1,%al
je     1200 <main+0xe0>
mov    (%r12,%rcx,4),%esi
lea    0xe08(%rip),%rdi
call   1030 <printf@plt>
mov    -0x38(%rbp),%rsp
xor    %eax,%eax
lea    -0x28(%rbp),%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [100 x i32]
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i64
%8 = alloca i32
%9 = alloca i32
store i32 0, i32* %1
%10 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
store i32 0, i32* %4
%11 = load i32, i32* %2
%12 = sub nsw i32 %11, 1
store i32 %12, i32* %5
%13 = load i32, i32* %2
%14 = zext i32 %13 to i64
%15 = call i8* @llvm.stacksave()
store i8* %15, i8** %6
%16 = alloca i32, i64 %14
store i64 %14, i64* %7
%17 = load i32, i32* %4
store i32 %17, i32* %8
br label %18
18: ; preds = %44, %0
%19 = load i32, i32* %8
%20 = load i32, i32* %2
%21 = icmp slt i32 %19, %20
br i1 %21, label %22, label %47
22: ; preds = %18
%23 = load i32, i32* %4
%24 = sext i32 %23 to i64
%25 = getelementptr inbounds [100 x i32], [100 x i32]* %3, i64 0, i64 %24
%26 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %25)
%27 = load i32, i32* %4
%28 = sext i32 %27 to i64
%29 = getelementptr inbounds [100 x i32], [100 x i32]* %3, i64 0, i64 %28
%30 = load i32, i32* %29
%31 = srem i32 %30, 2
%32 = icmp ne i32 %31, 0
br i1 %32, label %33, label %43
33: ; preds = %22
%34 = load i32, i32* %4
%35 = sext i32 %34 to i64
%36 = getelementptr inbounds [100 x i32], [100 x i32]* %3, i64 0, i64 %35
%37 = load i32, i32* %36
%38 = load i32, i32* %8
%39 = sext i32 %38 to i64
%40 = getelementptr inbounds i32, i32* %16, i64 %39
store i32 %37, i32* %40
%41 = load i32, i32* %8
%42 = add nsw i32 %41, 1
store i32 %42, i32* %8
br label %43
43: ; preds = %33, %22
br label %44
44: ; preds = %43
%45 = load i32, i32* %4
%46 = add nsw i32 %45, 1
store i32 %46, i32* %4
br label %18
47: ; preds = %18
store i32 0, i32* %4
br label %48
48: ; preds = %64, %47
%49 = load i32, i32* %4
%50 = sext i32 %49 to i64
%51 = getelementptr inbounds i32, i32* %16, i64 %50
%52 = load i32, i32* %51
%53 = load i32, i32* %5
%54 = sext i32 %53 to i64
%55 = getelementptr inbounds i32, i32* %16, i64 %54
%56 = load i32, i32* %55
%57 = sub nsw i32 %52, %56
store i32 %57, i32* %9
%58 = load i32, i32* %9
%59 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %58)
%60 = load i32, i32* %5
%61 = add nsw i32 %60, -1
store i32 %61, i32* %5
%62 = load i32, i32* %4
%63 = add nsw i32 %62, 1
store i32 %63, i32* %4
br label %64
64: ; preds = %48
%65 = load i32, i32* %4
%66 = load i32, i32* %2
%67 = sdiv i32 %66, 2
%68 = icmp slt i32 %65, %67
br i1 %68, label %48, label %69
69: ; preds = %64
%70 = load i32, i32* %2
%71 = srem i32 %70, 2
%72 = icmp ne i32 %71, 0
br i1 %72, label %73, label %80
73: ; preds = %69
%74 = load i32, i32* %2
%75 = sdiv i32 %74, 2
%76 = sext i32 %75 to i64
%77 = getelementptr inbounds i32, i32* %16, i64 %76
%78 = load i32, i32* %77
%79 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %78)
br label %80
80: ; preds = %73, %69
store i32 0, i32* %1
%81 = load i8*, i8** %6
%82 = load i32, i32* %1
ret i32 %82
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [100 x i32]
%3 = bitcast i32* %1 to i8*
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%5 = bitcast [100 x i32]* %2 to i8*
%6 = load i32, i32* %1
%7 = zext i32 %6 to i64
%8 = call i8* @llvm.stacksave()
%9 = alloca i32, i64 %7
%10 = load i32, i32* %1
%11 = icmp sgt i32 %10, 0
br i1 %11, label %14, label %12
12: ; preds = %26, %0
%13 = sext i32 %6 to i64
br label %31
14: ; preds = %0, %26
%15 = phi i64 [ %28, %26 ], [ 0, %0 ]
%16 = phi i32 [ %27, %26 ], [ 0, %0 ]
%17 = getelementptr inbounds [100 x i32], [100 x i32]* %2, i64 0, i64 %15
%18 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %17)
%19 = load i32, i32* %17
%20 = and i32 %19, 1
%21 = icmp eq i32 %20, 0
br i1 %21, label %26, label %22
22: ; preds = %14
%23 = sext i32 %16 to i64
%24 = getelementptr inbounds i32, i32* %9, i64 %23
store i32 %19, i32* %24
%25 = add nsw i32 %16, 1
br label %26
26: ; preds = %14, %22
%27 = phi i32 [ %25, %22 ], [ %16, %14 ]
%28 = add nuw i64 %15, 1
%29 = load i32, i32* %1
%30 = icmp slt i32 %27, %29
br i1 %30, label %14, label %12
31: ; preds = %12, %31
%32 = phi i64 [ 0, %12 ], [ %41, %31 ]
%33 = phi i64 [ %13, %12 ], [ %34, %31 ]
%34 = add nsw i64 %33, -1
%35 = getelementptr inbounds i32, i32* %9, i64 %32
%36 = load i32, i32* %35
%37 = getelementptr inbounds i32, i32* %9, i64 %34
%38 = load i32, i32* %37
%39 = sub nsw i32 %36, %38
%40 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %39)
%41 = add nuw nsw i64 %32, 1
%42 = load i32, i32* %1
%43 = sdiv i32 %42, 2
%44 = sext i32 %43 to i64
%45 = icmp slt i64 %41, %44
br i1 %45, label %31, label %46
46: ; preds = %31
%47 = and i32 %42, 1
%48 = icmp eq i32 %47, 0
br i1 %48, label %53, label %49
49: ; preds = %46
%50 = getelementptr inbounds i32, i32* %9, i64 %44
%51 = load i32, i32* %50
%52 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %51)
br label %53
53: ; preds = %49, %46
ret i32 0
}