#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, p, e, i;
  scanf("%d", &n);
  int m[n];
  for (e = 0; e < n;) {
    scanf("%d", &p);
    if (p % 2 == 1) {
      m[e] = p;
      e++;
    }
  }
  for (i = 0; i < n / 2; i++) {
    printf("%d\n", (m[i] - m[n - i - 1]));
    if (n % 2 != 0)
      printf("%d", m[n / 2]);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x8(%rbp),%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)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    11b9 <main+0x99>
lea    0xe80(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0xc(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x1,%edx
jne    11b4 <main+0x94>
mov    -0x30(%rbp),%rax
mov    -0xc(%rbp),%edx
movslq -0x10(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    116d <main+0x4d>
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x34(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x34(%rbp),%eax
cmp    %ecx,%eax
jge    124e <main+0x12e>
mov    -0x30(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
mov    -0x8(%rbp),%ecx
sub    -0x14(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
sub    (%rax,%rcx,4),%esi
lea    0xe04(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
je     123b <main+0x11b>
mov    -0x8(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x30(%rbp),%rax
movslq %ecx,%rcx
mov    (%rax,%rcx,4),%esi
lea    0xdca(%rip),%rdi
call   1030 <printf@plt>
jmp    1240 <main+0x120>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    11c0 <main+0xa0>
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),%rdi
lea    -0x2c(%rbp),%rsi
call   1040 <scanf@plt>
mov    %rsp,-0x38(%rbp)
mov    -0x2c(%rbp),%eax
mov    %rsp,%r13
lea    0xf(,%rax,4),%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%r13
mov    %r13,%rsp
cmpl   $0x0,-0x2c(%rbp)
jle    1233 <main+0x113>
xor    %ebx,%ebx
lea    0xe90(%rip),%r14
lea    -0x30(%rbp),%r12
jmp    1187 <main+0x67>
cs nopw 0x0(%rax,%rax,1)
mov    -0x2c(%rbp),%eax
cmp    %eax,%ebx
jge    11b5 <main+0x95>
mov    %r14,%rdi
mov    %r12,%rsi
call   1040 <scanf@plt>
mov    -0x30(%rbp),%eax
mov    %eax,%ecx
shr    $0x1f,%ecx
add    %eax,%ecx
and    $0xfffffffe,%ecx
mov    %eax,%edx
sub    %ecx,%edx
cmp    $0x1,%edx
jne    1180 <main+0x60>
movslq %ebx,%rbx
mov    %eax,0x0(%r13,%rbx,4)
add    $0x1,%ebx
jmp    1180 <main+0x60>
cmp    $0x2,%eax
jl     1233 <main+0x113>
mov    $0xffffffff,%ebx
xor    %r15d,%r15d
lea    0xe3a(%rip),%r12
lea    0xe30(%rip),%r14
jmp    11f8 <main+0xd8>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
add    $0x1,%r15
mov    %eax,%ecx
shr    $0x1f,%ecx
add    %eax,%ecx
sar    %ecx
movslq %ecx,%rcx
add    $0xffffffff,%ebx
cmp    %rcx,%r15
jge    1233 <main+0x113>
mov    0x0(%r13,%r15,4),%esi
add    %ebx,%eax
cltq
sub    0x0(%r13,%rax,4),%esi
mov    %r12,%rdi
call   1030 <printf@plt>
mov    -0x2c(%rbp),%eax
test   $0x1,%al
je     11e0 <main+0xc0>
mov    %eax,%ecx
shr    $0x1f,%ecx
add    %eax,%ecx
sar    %ecx
movslq %ecx,%rax
mov    0x0(%r13,%rax,4),%esi
mov    %r14,%rdi
call   1030 <printf@plt>
mov    -0x2c(%rbp),%eax
jmp    11e0 <main+0xc0>
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 i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i64
store i32 0, i32* %1
%8 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%9 = load i32, i32* %2
%10 = zext i32 %9 to i64
%11 = call i8* @llvm.stacksave()
store i8* %11, i8** %6
%12 = alloca i32, i64 %10
store i64 %10, i64* %7
store i32 0, i32* %4
br label %13
13: ; preds = %29, %0
%14 = load i32, i32* %4
%15 = load i32, i32* %2
%16 = icmp slt i32 %14, %15
br i1 %16, label %17, label %30
17: ; preds = %13
%18 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
%19 = load i32, i32* %3
%20 = srem i32 %19, 2
%21 = icmp eq i32 %20, 1
br i1 %21, label %22, label %29
22: ; preds = %17
%23 = load i32, i32* %3
%24 = load i32, i32* %4
%25 = sext i32 %24 to i64
%26 = getelementptr inbounds i32, i32* %12, i64 %25
store i32 %23, i32* %26
%27 = load i32, i32* %4
%28 = add nsw i32 %27, 1
store i32 %28, i32* %4
br label %29
29: ; preds = %22, %17
br label %13
30: ; preds = %13
store i32 0, i32* %5
br label %31
31: ; preds = %61, %30
%32 = load i32, i32* %5
%33 = load i32, i32* %2
%34 = sdiv i32 %33, 2
%35 = icmp slt i32 %32, %34
br i1 %35, label %36, label %64
36: ; preds = %31
%37 = load i32, i32* %5
%38 = sext i32 %37 to i64
%39 = getelementptr inbounds i32, i32* %12, i64 %38
%40 = load i32, i32* %39
%41 = load i32, i32* %2
%42 = load i32, i32* %5
%43 = sub nsw i32 %41, %42
%44 = sub nsw i32 %43, 1
%45 = sext i32 %44 to i64
%46 = getelementptr inbounds i32, i32* %12, i64 %45
%47 = load i32, i32* %46
%48 = sub nsw i32 %40, %47
%49 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %48)
%50 = load i32, i32* %2
%51 = srem i32 %50, 2
%52 = icmp ne i32 %51, 0
br i1 %52, label %53, label %60
53: ; preds = %36
%54 = load i32, i32* %2
%55 = sdiv i32 %54, 2
%56 = sext i32 %55 to i64
%57 = getelementptr inbounds i32, i32* %12, i64 %56
%58 = load i32, i32* %57
%59 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %58)
br label %60
60: ; preds = %53, %36
br label %61
61: ; preds = %60
%62 = load i32, i32* %5
%63 = add nsw i32 %62, 1
store i32 %63, i32* %5
br label %31
64: ; preds = %31
%65 = load i8*, i8** %6
%66 = load i32, i32* %1
ret i32 %66
}

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