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


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    -0x8(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0x10(%rbp)
lea    0xf(,%rax,4),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x28(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
lea    0xe9c(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x28(%rbp),%rsi
movslq -0x1c(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rsi
lea    0xe7d(%rip),%rdi
call   1040 <scanf@plt>
mov    -0x28(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
je     11ad <main+0x8d>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    11b2 <main+0x92>
mov    -0x1c(%rbp),%eax
cmp    -0x8(%rbp),%eax
jl     116d <main+0x4d>
movl   $0x0,-0x1c(%rbp)
movl   $0x1,-0x20(%rbp)
mov    -0x28(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
mov    -0x8(%rbp),%ecx
sub    -0x20(%rbp),%ecx
movslq %ecx,%rcx
sub    (%rax,%rcx,4),%esi
lea    0xe19(%rip),%rdi
call   1030 <printf@plt>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
mov    -0x1c(%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
jl     11cc <main+0xac>
mov    -0x8(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
je     1256 <main+0x136>
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    0xdb2(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rsp
mov    -0x4(%rbp),%eax
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %rsp,%r14
lea    0xecf(%rip),%rbx
lea    0x4(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
xor    %ebp,%ebp
mov    %ebp,%eax
lea    (%rsp,%rax,4),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
mov    (%rsp),%eax
and    $0x1,%eax
add    %eax,%ebp
cmp    0x4(%rsp),%ebp
jl     1140 <main+0x20>
xor    %ebx,%ebx
lea    0xe9e(%rip),%r15
cs nopw 0x0(%rax,%rax,1)
nop
mov    %r15,%rdi
xor    %esi,%esi
call   1030 <printf@plt>
add    $0x1,%rbx
mov    0x4(%rsp),%eax
mov    %eax,%ecx
shr    $0x1f,%ecx
add    %eax,%ecx
sar    %ecx
movslq %ecx,%rcx
cmp    %rcx,%rbx
jl     1170 <main+0x50>
test   $0x1,%al
je     11a6 <main+0x86>
mov    (%rsp),%esi
lea    0xe62(%rip),%rdi
call   1030 <printf@plt>
mov    %r14,%rsp
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
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 i8*
%4 = alloca i64
%5 = alloca i32
%6 = alloca i32
store i32 0, i32* %1
%7 = load i32, i32* %2
%8 = zext i32 %7 to i64
%9 = call i8* @llvm.stacksave()
store i8* %9, i8** %3
%10 = alloca i32, i64 %8
store i64 %8, i64* %4
store i32 0, i32* %5
%11 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
br label %12
12: ; preds = %27, %0
%13 = load i32, i32* %5
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds i32, i32* %10, i64 %14
%16 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %15)
%17 = load i32, i32* %5
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds i32, i32* %10, i64 %18
%20 = load i32, i32* %19
%21 = srem i32 %20, 2
%22 = icmp ne i32 %21, 0
br i1 %22, label %23, label %26
23: ; preds = %12
%24 = load i32, i32* %5
%25 = add nsw i32 %24, 1
store i32 %25, i32* %5
br label %26
26: ; preds = %23, %12
br label %27
27: ; preds = %26
%28 = load i32, i32* %5
%29 = load i32, i32* %2
%30 = icmp slt i32 %28, %29
br i1 %30, label %12, label %31
31: ; preds = %27
store i32 0, i32* %5
store i32 1, i32* %6
br label %32
32: ; preds = %49, %31
%33 = load i32, i32* %5
%34 = sext i32 %33 to i64
%35 = getelementptr inbounds i32, i32* %10, i64 %34
%36 = load i32, i32* %35
%37 = load i32, i32* %2
%38 = load i32, i32* %6
%39 = sub nsw i32 %37, %38
%40 = sext i32 %39 to i64
%41 = getelementptr inbounds i32, i32* %10, i64 %40
%42 = load i32, i32* %41
%43 = sub nsw i32 %36, %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* %5
%46 = add nsw i32 %45, 1
store i32 %46, i32* %5
%47 = load i32, i32* %6
%48 = add nsw i32 %47, 1
store i32 %48, i32* %6
br label %49
49: ; preds = %32
%50 = load i32, i32* %5
%51 = load i32, i32* %2
%52 = sdiv i32 %51, 2
%53 = icmp slt i32 %50, %52
br i1 %53, label %32, label %54
54: ; preds = %49
%55 = load i32, i32* %2
%56 = srem i32 %55, 2
%57 = icmp ne i32 %56, 0
br i1 %57, label %58, label %65
58: ; preds = %54
%59 = load i32, i32* %2
%60 = sdiv i32 %59, 2
%61 = sext i32 %60 to i64
%62 = getelementptr inbounds i32, i32* %10, i64 %61
%63 = load i32, i32* %62
%64 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %63)
br label %65
65: ; preds = %58, %54
store i32 0, i32* %1
%66 = load i8*, i8** %3
%67 = load i32, i32* %1
ret i32 %67
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca [0 x i32]
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = tail call i8* @llvm.stacksave()
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%6 = getelementptr inbounds [0 x i32], [0 x i32]* %1, i64 0, i64 0
br label %7
7: ; preds = %7, %0
%8 = phi i32 [ 0, %0 ], [ %14, %7 ]
%9 = zext i32 %8 to i64
%10 = getelementptr inbounds [0 x i32], [0 x i32]* %1, i64 0, i64 %9
%11 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %10)
%12 = load i32, i32* %6
%13 = and i32 %12, 1
%14 = add nuw nsw i32 %13, %8
%15 = load i32, i32* %2
%16 = icmp slt i32 %14, %15
br i1 %16, label %7, label %17
17: ; preds = %7, %17
%18 = phi i64 [ %20, %17 ], [ 0, %7 ]
%19 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 0)
%20 = add nuw nsw i64 %18, 1
%21 = load i32, i32* %2
%22 = sdiv i32 %21, 2
%23 = sext i32 %22 to i64
%24 = icmp slt i64 %20, %23
br i1 %24, label %17, label %25
25: ; preds = %17
%26 = and i32 %21, 1
%27 = icmp eq i32 %26, 0
br i1 %27, label %32, label %28
28: ; preds = %25
%29 = getelementptr inbounds [0 x i32], [0 x i32]* %1, i64 0, i64 0
%30 = load i32, i32* %29
%31 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %30)
br label %32
32: ; preds = %28, %25
ret i32 0
}