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


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
lea    0xebc(%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)
mov    -0x10(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    11c0 <main+0xa0>
lea    0xe79(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0xc(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x1,%edx
jne    11bb <main+0x9b>
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    1174 <main+0x54>
jmp    11c5 <main+0xa5>
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    0xe1d(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
je     1222 <main+0x102>
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    0xde3(%rip),%rdi
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-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
jl     11c5 <main+0xa5>
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
mov    -0x2c(%rbp),%eax
test   %eax,%eax
jle    11b5 <main+0x95>
xor    %ebx,%ebx
lea    0xe93(%rip),%r14
lea    -0x30(%rbp),%r12
jmp    1187 <main+0x67>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
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>
mov    $0xffffffff,%ebx
xor    %r15d,%r15d
lea    0xe3f(%rip),%r12
lea    0xe35(%rip),%r14
jmp    11e8 <main+0xc8>
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 i32
%6 = alloca i8*
%7 = alloca i64
store i32 0, i32* %1
store i32 0, i32* %4
store i32 0, i32* %5
%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
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
br label %31
31: ; preds = %58, %30
%32 = load i32, i32* %5
%33 = sext i32 %32 to i64
%34 = getelementptr inbounds i32, i32* %12, i64 %33
%35 = load i32, i32* %34
%36 = load i32, i32* %2
%37 = load i32, i32* %5
%38 = sub nsw i32 %36, %37
%39 = sub nsw i32 %38, 1
%40 = sext i32 %39 to i64
%41 = getelementptr inbounds i32, i32* %12, i64 %40
%42 = load i32, i32* %41
%43 = sub nsw i32 %35, %42
%44 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %43)
%45 = load i32, i32* %2
%46 = srem i32 %45, 2
%47 = icmp ne i32 %46, 0
br i1 %47, label %48, label %55
48: ; preds = %31
%49 = load i32, i32* %2
%50 = sdiv i32 %49, 2
%51 = sext i32 %50 to i64
%52 = getelementptr inbounds i32, i32* %12, 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 = %48, %31
%56 = load i32, i32* %5
%57 = add nsw i32 %56, 1
store i32 %57, i32* %5
br label %58
58: ; preds = %55
%59 = load i32, i32* %5
%60 = load i32, i32* %2
%61 = sdiv i32 %60, 2
%62 = icmp slt i32 %59, %61
br i1 %62, label %31, label %63
63: ; preds = %58
%64 = load i8*, i8** %6
%65 = load i32, i32* %1
ret i32 %65
}

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 %12, label %26
12: ; preds = %0, %22
%13 = phi i32 [ %23, %22 ], [ 0, %0 ]
%14 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%15 = load i32, i32* %2
%16 = srem i32 %15, 2
%17 = icmp eq i32 %16, 1
br i1 %17, label %18, label %22
18: ; preds = %12
%19 = sext i32 %13 to i64
%20 = getelementptr inbounds i32, i32* %9, i64 %19
store i32 %15, i32* %20
%21 = add nsw i32 %13, 1
br label %22
22: ; preds = %18, %12
%23 = phi i32 [ %21, %18 ], [ %13, %12 ]
%24 = load i32, i32* %1
%25 = icmp slt i32 %23, %24
br i1 %25, label %12, label %26
26: ; preds = %22, %0
%27 = phi i32 [ %10, %0 ], [ %24, %22 ]
br label %28
28: ; preds = %26, %51
%29 = phi i32 [ %52, %51 ], [ %27, %26 ]
%30 = phi i64 [ %53, %51 ], [ 0, %26 ]
%31 = trunc i64 %30 to i32
%32 = getelementptr inbounds i32, i32* %9, i64 %30
%33 = load i32, i32* %32
%34 = xor i32 %31, -1
%35 = add i32 %29, %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 %30, 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
ret i32 0
}