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


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1b0,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xec7(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
movl   $0x0,-0x1a4(%rbp)
mov    -0x1a4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    11af <main+0x8f>
movslq -0x1a4(%rbp),%rax
lea    -0x1a0(%rbp),%rsi
shl    $0x2,%rax
add    %rax,%rsi
lea    0xe89(%rip),%rdi
call   1040 <scanf@plt>
movslq -0x1a4(%rbp),%rax
mov    -0x1a0(%rbp,%rax,4),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
je     11aa <main+0x8a>
mov    -0x1a4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1a4(%rbp)
jmp    114c <main+0x2c>
movl   $0x0,-0x1a4(%rbp)
mov    -0x1a4(%rbp),%eax
mov    %eax,-0x1a8(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x1a8(%rbp),%eax
cmp    %ecx,%eax
jge    1223 <main+0x103>
movslq -0x1a4(%rbp),%rax
mov    -0x1a0(%rbp,%rax,4),%esi
mov    -0x8(%rbp),%eax
sub    -0x1a4(%rbp),%eax
sub    $0x1,%eax
cltq
sub    -0x1a0(%rbp,%rax,4),%esi
lea    0xdf9(%rip),%rdi
call   1030 <printf@plt>
mov    -0x1a4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1a4(%rbp)
jmp    11b9 <main+0x99>
mov    -0x8(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
je     1257 <main+0x137>
mov    -0x8(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cltq
mov    -0x1a0(%rbp,%rax,4),%esi
lea    0xdb1(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x1b0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
sub    $0x1a0,%rsp
lea    0xece(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1040 <scanf@plt>
mov    0xc(%rsp),%eax
test   %eax,%eax
jle    11c2 <main+0xa2>
xor    %ebp,%ebp
lea    0xeb3(%rip),%r14
nopl   (%rax)
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     11ef <main+0xcf>
mov    $0xffffffff,%ebp
xor    %ebx,%ebx
lea    0xe7d(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
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    0xc(%rsp),%eax
mov    %eax,%ecx
shr    $0x1f,%ecx
add    %eax,%ecx
sar    %ecx
movslq %ecx,%rdx
add    $0xffffffff,%ebp
cmp    %rdx,%rbx
jl     1190 <main+0x70>
jmp    11ca <main+0xaa>
mov    %eax,%ecx
neg    %ecx
shr    %ecx
neg    %ecx
test   $0x1,%al
je     11e1 <main+0xc1>
movslq %ecx,%rax
mov    0x10(%rsp,%rax,4),%esi
lea    0xe27(%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    11ce <main+0xae>
jmp    11e1 <main+0xc1>

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