#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 arr[600], n, count = 0, a;
  scanf("%d", &n);
  while (count < n) {
    scanf("%d", &a);
    if (a % 2 == 1) {
      arr[count] = a;
      count++;
    }
  }
  for (count = 0; count < n / 2; count++) {
    printf("%d\n", arr[count] - arr[n - count - 1]);
  }
  if (n % 2 == 1)
    printf("%d\n", arr[n / 2]);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x980,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x978(%rbp)
lea    0xebd(%rip),%rdi
lea    -0x974(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x978(%rbp),%eax
cmp    -0x974(%rbp),%eax
jge    11b3 <main+0x93>
lea    0xe98(%rip),%rdi
lea    -0x97c(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x97c(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x1,%edx
jne    11ae <main+0x8e>
mov    -0x97c(%rbp),%ecx
movslq -0x978(%rbp),%rax
mov    %ecx,-0x970(%rbp,%rax,4)
mov    -0x978(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x978(%rbp)
jmp    114f <main+0x2f>
movl   $0x0,-0x978(%rbp)
mov    -0x978(%rbp),%eax
mov    %eax,-0x980(%rbp)
mov    -0x974(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x980(%rbp),%eax
cmp    %ecx,%eax
jge    122d <main+0x10d>
movslq -0x978(%rbp),%rax
mov    -0x970(%rbp,%rax,4),%esi
mov    -0x974(%rbp),%eax
sub    -0x978(%rbp),%eax
sub    $0x1,%eax
cltq
sub    -0x970(%rbp,%rax,4),%esi
lea    0xdef(%rip),%rdi
call   1030 <printf@plt>
mov    -0x978(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x978(%rbp)
jmp    11bd <main+0x9d>
mov    -0x974(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x1,%edx
jne    1267 <main+0x147>
mov    -0x974(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cltq
mov    -0x970(%rbp,%rax,4),%esi
lea    0xda1(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x980,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
sub    $0x970,%rsp
lea    0xece(%rip),%rdi
lea    0x8(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x8(%rsp),%eax
test   %eax,%eax
jle    11e2 <main+0xc2>
xor    %ebp,%ebp
lea    0xeaf(%rip),%r14
lea    0xc(%rsp),%rbx
jmp    1168 <main+0x48>
nopl   0x0(%rax,%rax,1)
mov    0x8(%rsp),%eax
cmp    %eax,%ebp
jge    1196 <main+0x76>
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    1160 <main+0x40>
movslq %ebp,%rbp
mov    %eax,0x10(%rsp,%rbp,4)
add    $0x1,%ebp
jmp    1160 <main+0x40>
cmp    $0x2,%eax
jl     11ec <main+0xcc>
mov    $0xffffffff,%ebp
xor    %ebx,%ebx
lea    0xe5a(%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     11b0 <main+0x90>
jmp    11f5 <main+0xd5>
mov    %eax,%ecx
neg    %ecx
shr    %ecx
neg    %ecx
jmp    11f5 <main+0xd5>
mov    %eax,%ecx
shr    $0x1f,%ecx
add    %eax,%ecx
sar    %ecx
mov    %eax,%edx
shr    $0x1f,%edx
add    %eax,%edx
and    $0xfffffffe,%edx
sub    %edx,%eax
cmp    $0x1,%eax
jne    1219 <main+0xf9>
movslq %ecx,%rax
mov    0x10(%rsp,%rax,4),%esi
lea    0xdef(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x970,%rsp
pop    %rbx
pop    %r14
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 [600 x i32]
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %4
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
br label %7
7: ; preds = %23, %0
%8 = load i32, i32* %4
%9 = load i32, i32* %3
%10 = icmp slt i32 %8, %9
br i1 %10, label %11, label %24
11: ; preds = %7
%12 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %5)
%13 = load i32, i32* %5
%14 = srem i32 %13, 2
%15 = icmp eq i32 %14, 1
br i1 %15, label %16, label %23
16: ; preds = %11
%17 = load i32, i32* %5
%18 = load i32, i32* %4
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds [600 x i32], [600 x i32]* %2, i64 0, i64 %19
store i32 %17, i32* %20
%21 = load i32, i32* %4
%22 = add nsw i32 %21, 1
store i32 %22, i32* %4
br label %23
23: ; preds = %16, %11
br label %7
24: ; preds = %7
store i32 0, i32* %4
br label %25
25: ; preds = %44, %24
%26 = load i32, i32* %4
%27 = load i32, i32* %3
%28 = sdiv i32 %27, 2
%29 = icmp slt i32 %26, %28
br i1 %29, label %30, label %47
30: ; preds = %25
%31 = load i32, i32* %4
%32 = sext i32 %31 to i64
%33 = getelementptr inbounds [600 x i32], [600 x i32]* %2, i64 0, i64 %32
%34 = load i32, i32* %33
%35 = load i32, i32* %3
%36 = load i32, i32* %4
%37 = sub nsw i32 %35, %36
%38 = sub nsw i32 %37, 1
%39 = sext i32 %38 to i64
%40 = getelementptr inbounds [600 x i32], [600 x i32]* %2, i64 0, i64 %39
%41 = load i32, i32* %40
%42 = sub nsw i32 %34, %41
%43 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %42)
br label %44
44: ; preds = %30
%45 = load i32, i32* %4
%46 = add nsw i32 %45, 1
store i32 %46, i32* %4
br label %25
47: ; preds = %25
%48 = load i32, i32* %3
%49 = srem i32 %48, 2
%50 = icmp eq i32 %49, 1
br i1 %50, label %51, label %58
51: ; preds = %47
%52 = load i32, i32* %3
%53 = sdiv i32 %52, 2
%54 = sext i32 %53 to i64
%55 = getelementptr inbounds [600 x i32], [600 x i32]* %2, i64 0, i64 %54
%56 = load i32, i32* %55
%57 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %56)
br label %58
58: ; preds = %51, %47
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 [600 x i32]
%2 = alloca i32
%3 = alloca i32
%4 = bitcast [600 x i32]* %1 to i8*
%5 = bitcast i32* %2 to i8*
%6 = bitcast i32* %3 to i8*
%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 = 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* %3)
%20 = load i32, i32* %3
%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 [600 x i32], [600 x i32]* %1, 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* %2
%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 [600 x i32], [600 x i32]* %1, 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 [600 x i32], [600 x i32]* %1, 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* %2
%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 = srem i32 %50, 2
%53 = icmp eq i32 %52, 1
br i1 %53, label %54, label %59
54: ; preds = %49
%55 = sext i32 %51 to i64
%56 = getelementptr inbounds [600 x i32], [600 x i32]* %1, 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
}