#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, i, odds, num, mid;
  odds = 0;
  scanf("%d", &n);
  int arr[n - 1];
  do {
    scanf("%d", &num);
    if (num % 2 != 0) {
      arr[odds] = num;
      odds++;
    }
  } while (odds < n);
  mid = n / 2;
  for (i = 0; i < mid; i++)
    printf("%d\n", arr[i] - arr[n - 1 - i]);
  if (n % 2 == 1)
    printf("%d", arr[mid]);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x10(%rbp)
lea    0xec3(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %rsp,%rcx
mov    %rcx,-0x20(%rbp)
lea    0xf(,%rax,4),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x30(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x28(%rbp)
lea    0xe89(%rip),%rdi
lea    -0x14(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x14(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
je     11ab <main+0x8b>
mov    -0x30(%rbp),%rax
mov    -0x14(%rbp),%edx
movslq -0x10(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    11b0 <main+0x90>
mov    -0x10(%rbp),%eax
cmp    -0x8(%rbp),%eax
jl     1170 <main+0x50>
mov    -0x8(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x18(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x18(%rbp),%eax
jge    1211 <main+0xf1>
mov    -0x30(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
mov    -0x8(%rbp),%ecx
sub    $0x1,%ecx
sub    -0xc(%rbp),%ecx
movslq %ecx,%rcx
sub    (%rax,%rcx,4),%esi
lea    0xe05(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    11d1 <main+0xb1>
mov    -0x8(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x1,%edx
jne    123c <main+0x11c>
mov    -0x30(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xdc9(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x20(%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    $0x18,%rsp
lea    0xec8(%rip),%r15
lea    -0x2c(%rbp),%rsi
mov    %r15,%rdi
call   1040 <scanf@plt>
mov    %rsp,-0x40(%rbp)
mov    -0x2c(%rbp),%eax
add    $0xffffffff,%eax
mov    %rsp,%r14
lea    0xf(,%rax,4),%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%r14
mov    %r14,%rsp
xor    %ebx,%ebx
lea    -0x34(%rbp),%r12
jmp    1177 <main+0x57>
nopl   0x0(%rax,%rax,1)
mov    -0x2c(%rbp),%eax
cmp    %eax,%ebx
jge    1195 <main+0x75>
mov    %r15,%rdi
mov    %r12,%rsi
call   1040 <scanf@plt>
mov    -0x34(%rbp),%eax
test   $0x1,%al
je     1170 <main+0x50>
movslq %ebx,%rbx
mov    %eax,(%r14,%rbx,4)
add    $0x1,%ebx
jmp    1170 <main+0x50>
mov    %eax,%ecx
shr    $0x1f,%ecx
add    %eax,%ecx
sar    %ecx
cmp    $0x2,%eax
mov    %ecx,-0x30(%rbp)
jl     11e5 <main+0xc5>
mov    %ecx,%r13d
mov    $0xffffffff,%r15d
xor    %r12d,%r12d
lea    0xe4a(%rip),%rbx
nopl   0x0(%rax)
mov    (%r14,%r12,4),%esi
add    %r15d,%eax
cltq
sub    (%r14,%rax,4),%esi
mov    %rbx,%rdi
call   1030 <printf@plt>
add    $0x1,%r12
mov    -0x2c(%rbp),%eax
add    $0xffffffff,%r15d
cmp    %r12,%r13
jne    11c0 <main+0xa0>
mov    %eax,%ecx
shr    $0x1f,%ecx
add    %eax,%ecx
and    $0xfffffffe,%ecx
sub    %ecx,%eax
cmp    $0x1,%eax
jne    120a <main+0xea>
movslq -0x30(%rbp),%rax
mov    (%r14,%rax,4),%esi
lea    0xdfb(%rip),%rdi
call   1030 <printf@plt>
mov    -0x40(%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 i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i64
store i32 0, i32* %1
store i32 0, i32* %4
%9 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%10 = load i32, i32* %2
%11 = sub nsw i32 %10, 1
%12 = zext i32 %11 to i64
%13 = call i8* @llvm.stacksave()
store i8* %13, i8** %7
%14 = alloca i32, i64 %12
store i64 %12, i64* %8
br label %15
15: ; preds = %28, %0
%16 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %5)
%17 = load i32, i32* %5
%18 = srem i32 %17, 2
%19 = icmp ne i32 %18, 0
br i1 %19, label %20, label %27
20: ; preds = %15
%21 = load i32, i32* %5
%22 = load i32, i32* %4
%23 = sext i32 %22 to i64
%24 = getelementptr inbounds i32, i32* %14, i64 %23
store i32 %21, i32* %24
%25 = load i32, i32* %4
%26 = add nsw i32 %25, 1
store i32 %26, i32* %4
br label %27
27: ; preds = %20, %15
br label %28
28: ; preds = %27
%29 = load i32, i32* %4
%30 = load i32, i32* %2
%31 = icmp slt i32 %29, %30
br i1 %31, label %15, label %32
32: ; preds = %28
%33 = load i32, i32* %2
%34 = sdiv i32 %33, 2
store i32 %34, i32* %6
store i32 0, i32* %3
br label %35
35: ; preds = %53, %32
%36 = load i32, i32* %3
%37 = load i32, i32* %6
%38 = icmp slt i32 %36, %37
br i1 %38, label %39, label %56
39: ; preds = %35
%40 = load i32, i32* %3
%41 = sext i32 %40 to i64
%42 = getelementptr inbounds i32, i32* %14, i64 %41
%43 = load i32, i32* %42
%44 = load i32, i32* %2
%45 = sub nsw i32 %44, 1
%46 = load i32, i32* %3
%47 = sub nsw i32 %45, %46
%48 = sext i32 %47 to i64
%49 = getelementptr inbounds i32, i32* %14, i64 %48
%50 = load i32, i32* %49
%51 = sub nsw i32 %43, %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 = %39
%54 = load i32, i32* %3
%55 = add nsw i32 %54, 1
store i32 %55, i32* %3
br label %35
56: ; preds = %35
%57 = load i32, i32* %2
%58 = srem i32 %57, 2
%59 = icmp eq i32 %58, 1
br i1 %59, label %60, label %66
60: ; preds = %56
%61 = load i32, i32* %6
%62 = sext i32 %61 to i64
%63 = getelementptr inbounds i32, i32* %14, i64 %62
%64 = load i32, i32* %63
%65 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %64)
br label %66
66: ; preds = %60, %56
store i32 0, i32* %1
%67 = load i8*, i8** %7
%68 = load i32, i32* %1
ret i32 %68
}

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