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


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%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,-0x18(%rbp)
lea    0xf(,%rax,4),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x28(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x20(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    11b9 <main+0x99>
lea    0xe80(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x10(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
je     11b4 <main+0x94>
mov    -0x28(%rbp),%rax
mov    -0x10(%rbp),%edx
movslq -0xc(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    116d <main+0x4d>
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x2c(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x2c(%rbp),%eax
cmp    %ecx,%eax
jge    1249 <main+0x129>
mov    -0x28(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
mov    -0x8(%rbp),%ecx
sub    -0xc(%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    -0x28(%rbp),%rax
movslq %ecx,%rcx
mov    (%rax,%rcx,4),%esi
lea    0xdca(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    11c0 <main+0xa0>
mov    -0x18(%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    1223 <main+0x103>
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    11a6 <main+0x86>
mov    %r14,%rdi
mov    %r12,%rsi
call   1040 <scanf@plt>
mov    -0x30(%rbp),%eax
test   $0x1,%al
je     1180 <main+0x60>
movslq %ebx,%rbx
mov    %eax,0x0(%r13,%rbx,4)
add    $0x1,%ebx
jmp    1180 <main+0x60>
cmp    $0x2,%eax
jl     1223 <main+0x103>
mov    $0xffffffff,%ebx
xor    %r15d,%r15d
lea    0xe49(%rip),%r12
lea    0xe3f(%rip),%r14
jmp    11e8 <main+0xc8>
cs nopw 0x0(%rax,%rax,1)
nopl   (%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    1223 <main+0x103>
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     11d0 <main+0xb0>
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    11d0 <main+0xb0>
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 i8*
%6 = alloca i64
store i32 0, i32* %1
%7 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%8 = load i32, i32* %2
%9 = zext i32 %8 to i64
%10 = call i8* @llvm.stacksave()
store i8* %10, i8** %5
%11 = alloca i32, i64 %9
store i64 %9, i64* %6
store i32 0, i32* %3
br label %12
12: ; preds = %28, %0
%13 = load i32, i32* %3
%14 = load i32, i32* %2
%15 = icmp slt i32 %13, %14
br i1 %15, label %16, label %29
16: ; preds = %12
%17 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %4)
%18 = load i32, i32* %4
%19 = srem i32 %18, 2
%20 = icmp ne i32 %19, 0
br i1 %20, label %21, label %28
21: ; preds = %16
%22 = load i32, i32* %4
%23 = load i32, i32* %3
%24 = sext i32 %23 to i64
%25 = getelementptr inbounds i32, i32* %11, i64 %24
store i32 %22, i32* %25
%26 = load i32, i32* %3
%27 = add nsw i32 %26, 1
store i32 %27, i32* %3
br label %28
28: ; preds = %21, %16
br label %12
29: ; preds = %12
store i32 0, i32* %3
br label %30
30: ; preds = %59, %29
%31 = load i32, i32* %3
%32 = load i32, i32* %2
%33 = sdiv i32 %32, 2
%34 = icmp slt i32 %31, %33
br i1 %34, label %35, label %62
35: ; preds = %30
%36 = load i32, i32* %3
%37 = sext i32 %36 to i64
%38 = getelementptr inbounds i32, i32* %11, i64 %37
%39 = load i32, i32* %38
%40 = load i32, i32* %2
%41 = load i32, i32* %3
%42 = sub nsw i32 %40, %41
%43 = sub nsw i32 %42, 1
%44 = sext i32 %43 to i64
%45 = getelementptr inbounds i32, i32* %11, i64 %44
%46 = load i32, i32* %45
%47 = sub nsw i32 %39, %46
%48 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %47)
%49 = load i32, i32* %2
%50 = srem i32 %49, 2
%51 = icmp ne i32 %50, 0
br i1 %51, label %52, label %59
52: ; preds = %35
%53 = load i32, i32* %2
%54 = sdiv i32 %53, 2
%55 = sext i32 %54 to i64
%56 = getelementptr inbounds i32, i32* %11, i64 %55
%57 = load i32, i32* %56
%58 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %57)
br label %59
59: ; preds = %52, %35
%60 = load i32, i32* %3
%61 = add nsw i32 %60, 1
store i32 %61, i32* %3
br label %30
62: ; preds = %30
%63 = load i8*, i8** %5
%64 = load i32, i32* %1
ret i32 %64
}

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 = and i32 %17, 1
%19 = icmp eq i32 %18, 0
br i1 %19, label %24, label %20
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 = %44, %28
%52 = phi i32 [ %50, %44 ], [ %41, %28 ]
%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
}