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


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1c0,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
lea    0xeab(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    11b1 <main+0x91>
lea    0xe88(%rip),%rdi
lea    -0x14(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x14(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x1,%edx
jne    11ac <main+0x8c>
mov    -0x14(%rbp),%ecx
movslq -0xc(%rbp),%rax
mov    %ecx,-0x1b0(%rbp,%rax,4)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1165 <main+0x45>
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x1b4(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x1b4(%rbp),%eax
cmp    %ecx,%eax
jge    121a <main+0xfa>
movslq -0xc(%rbp),%rax
mov    -0x1b0(%rbp,%rax,4),%eax
mov    -0x8(%rbp),%ecx
sub    -0xc(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
sub    -0x1b0(%rbp,%rcx,4),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%esi
lea    0xdfc(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    11b8 <main+0x98>
mov    -0x8(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
je     124e <main+0x12e>
mov    -0x8(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cltq
mov    -0x1b0(%rbp,%rax,4),%esi
lea    0xdba(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x1c0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
sub    $0x1a0,%rsp
movl   $0x0,0x8(%rsp)
movl   $0x0,0xc(%rsp)
lea    0xebe(%rip),%rdi
lea    0x8(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x8(%rsp),%eax
test   %eax,%eax
jle    11f2 <main+0xd2>
xor    %ebp,%ebp
lea    0xe9f(%rip),%r14
lea    0xc(%rsp),%rbx
jmp    1178 <main+0x58>
nopl   0x0(%rax,%rax,1)
mov    0x8(%rsp),%eax
cmp    %eax,%ebp
jge    11a6 <main+0x86>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <scanf@plt>
mov    0xc(%rsp),%eax
mov    %eax,%ecx
shr    $0x1f,%ecx
add    %eax,%ecx
and    $0xfffffffe,%ecx
mov    %eax,%edx
sub    %ecx,%edx
cmp    $0x1,%edx
jne    1170 <main+0x50>
movslq %ebp,%rbp
mov    %eax,0x10(%rsp,%rbp,4)
add    $0x1,%ebp
jmp    1170 <main+0x50>
cmp    $0x2,%eax
jl     121f <main+0xff>
mov    $0xffffffff,%ebp
xor    %ebx,%ebx
lea    0xe4a(%rip),%r14
nopl   0x0(%rax)
mov    0x10(%rsp,%rbx,4),%esi
add    %ebp,%eax
cltq
sub    0x10(%rsp,%rax,4),%esi
mov    %r14,%rdi
call   1030 <printf@plt>
add    $0x1,%rbx
mov    0x8(%rsp),%eax
mov    %eax,%ecx
shr    $0x1f,%ecx
add    %eax,%ecx
sar    %ecx
movslq %ecx,%rdx
add    $0xffffffff,%ebp
cmp    %rdx,%rbx
jl     11c0 <main+0xa0>
jmp    11fa <main+0xda>
mov    %eax,%ecx
neg    %ecx
shr    %ecx
neg    %ecx
test   $0x1,%al
je     1211 <main+0xf1>
movslq %ecx,%rax
mov    0x10(%rsp,%rax,4),%esi
lea    0xdf7(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x1a0,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret
mov    %eax,%ecx
shr    $0x1f,%ecx
add    %eax,%ecx
sar    %ecx
test   $0x1,%al
jne    11fe <main+0xde>
jmp    1211 <main+0xf1>

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

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