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


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1b0,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x1a8(%rbp)
movl   $0x1,-0x1ac(%rbp)
lea    0xeb3(%rip),%rdi
lea    -0x1a4(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x1a8(%rbp),%eax
cmp    -0x1a4(%rbp),%eax
jge    11bf <main+0x9f>
movslq -0x1a8(%rbp),%rax
lea    -0x1a0(%rbp),%rsi
shl    $0x2,%rax
add    %rax,%rsi
lea    0xe79(%rip),%rdi
call   1040 <scanf@plt>
movslq -0x1a8(%rbp),%rax
mov    -0x1a0(%rbp,%rax,4),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
je     11ba <main+0x9a>
mov    -0x1a8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1a8(%rbp)
jmp    1159 <main+0x39>
movl   $0x0,-0x1a8(%rbp)
mov    -0x1a8(%rbp),%eax
mov    %eax,-0x1b0(%rbp)
mov    -0x1a4(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x1b0(%rbp),%eax
cmp    %ecx,%eax
jge    1245 <main+0x125>
movslq -0x1a8(%rbp),%rax
mov    -0x1a0(%rbp,%rax,4),%esi
mov    -0x1a4(%rbp),%eax
sub    -0x1ac(%rbp),%eax
cltq
sub    -0x1a0(%rbp,%rax,4),%esi
lea    0xde6(%rip),%rdi
call   1030 <printf@plt>
mov    -0x1a8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1a8(%rbp)
mov    -0x1ac(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1ac(%rbp)
jmp    11c9 <main+0xa9>
mov    -0x1a4(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
je     127f <main+0x15f>
mov    -0x1a4(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cltq
mov    -0x1a0(%rbp,%rax,4),%esi
lea    0xd89(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x1b0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %rbx
sub    $0x1a8,%rsp
lea    0xecc(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1040 <scanf@plt>
mov    0xc(%rsp),%eax
test   %eax,%eax
jle    11c4 <main+0xa4>
xor    %ebp,%ebp
lea    0xeb1(%rip),%r14
nop
mov    %ebp,%ebx
lea    (%rsp,%rbx,4),%rsi
add    $0x10,%rsi
mov    %r14,%rdi
call   1040 <scanf@plt>
mov    0x10(%rsp,%rbx,4),%eax
and    $0x1,%eax
add    %eax,%ebp
mov    0xc(%rsp),%eax
cmp    %eax,%ebp
jl     1150 <main+0x30>
cmp    $0x2,%eax
jl     11f3 <main+0xd3>
mov    $0xffffffffffffffff,%r15
xor    %ebx,%ebx
lea    0xe7b(%rip),%r14
nopl   0x0(%rax,%rax,1)
mov    0x10(%rsp,%rbx,4),%esi
cltq
add    %r15,%rax
sub    0x10(%rsp,%rax,4),%esi
mov    %r14,%rdi
call   1030 <printf@plt>
add    $0x1,%rbx
mov    0xc(%rsp),%eax
mov    %eax,%ecx
shr    $0x1f,%ecx
add    %eax,%ecx
sar    %ecx
movslq %ecx,%rdx
add    $0xffffffffffffffff,%r15
cmp    %rdx,%rbx
jl     1190 <main+0x70>
jmp    11cc <main+0xac>
mov    %eax,%ecx
neg    %ecx
shr    %ecx
neg    %ecx
test   $0x1,%al
je     11e3 <main+0xc3>
movslq %ecx,%rax
mov    0x10(%rsp,%rax,4),%esi
lea    0xe25(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x1a8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret
mov    %eax,%ecx
shr    $0x1f,%ecx
add    %eax,%ecx
sar    %ecx
test   $0x1,%al
jne    11d0 <main+0xb0>
jmp    11e3 <main+0xc3>

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