#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 *, float, float);
int /*<<< orphan*/ scanf(char *, ...);
int main() {
  int n;
  scanf("%d", &n);
  float cur_pos[2];
  scanf("%f %f", &cur_pos[0], &cur_pos[1]);
  float bidoni[n][2];
  int i;
  for (i = 0; i < n; i++) {
    scanf("%f %f", &bidoni[i][0], &bidoni[i][1]);
  }
  float weight = 1.00;
  float delta_x;
  float delta_y;
  for (i = 0; i < n; i++) {
    delta_x = bidoni[i][0] - cur_pos[0];
    delta_y = bidoni[i][1] - cur_pos[1];
    delta_x = delta_x + delta_x / weight;
    delta_y = delta_y + delta_y / weight;
    printf("%0.2f %0.2f\n", delta_x, delta_y);
    cur_pos[0] = cur_pos[0] + delta_x;
    cur_pos[1] = cur_pos[1] + delta_y;
    weight = weight * 2;
  }
  printf("%0.2f %0.2f\n", cur_pos[0], cur_pos[1]);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xed2(%rip),%rdi
xor    %eax,%eax
mov    %al,-0x39(%rbp)
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x39(%rbp),%al
lea    -0xc(%rbp),%rdx
lea    0xeb9(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0x18(%rbp)
lea    0xf(,%rax,8),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x38(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x20(%rbp)
movl   $0x0,-0x24(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    11d2 <main+0xb2>
mov    -0x38(%rbp),%rdx
movslq -0x24(%rbp),%rax
shl    $0x3,%rax
mov    %rdx,%rsi
add    %rax,%rsi
movslq -0x24(%rbp),%rax
shl    $0x3,%rax
add    %rax,%rdx
add    $0x4,%rdx
lea    0xe4e(%rip),%rdi
mov    $0x0,%al
call   1040 <scanf@plt>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    1189 <main+0x69>
movss  0xe26(%rip),%xmm0
movss  %xmm0,-0x28(%rbp)
movl   $0x0,-0x24(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    12a1 <main+0x181>
mov    -0x38(%rbp),%rax
movslq -0x24(%rbp),%rcx
movss  (%rax,%rcx,8),%xmm0
subss  -0x10(%rbp),%xmm0
movss  %xmm0,-0x2c(%rbp)
movslq -0x24(%rbp),%rcx
movss  0x4(%rax,%rcx,8),%xmm0
subss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x30(%rbp)
movss  -0x2c(%rbp),%xmm0
movss  -0x2c(%rbp),%xmm1
divss  -0x28(%rbp),%xmm1
addss  %xmm1,%xmm0
movss  %xmm0,-0x2c(%rbp)
movss  -0x30(%rbp),%xmm0
movss  -0x30(%rbp),%xmm1
divss  -0x28(%rbp),%xmm1
addss  %xmm1,%xmm0
movss  %xmm0,-0x30(%rbp)
movss  -0x2c(%rbp),%xmm0
movss  -0x30(%rbp),%xmm1
lea    0xdb3(%rip),%rdi
call   1030 <printf@plt>
movss  -0x10(%rbp),%xmm0
addss  -0x2c(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0xc(%rbp),%xmm0
addss  -0x30(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  0xd7b(%rip),%xmm0
mulss  -0x28(%rbp),%xmm0
movss  %xmm0,-0x28(%rbp)
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    11e6 <main+0xc6>
movss  -0x10(%rbp),%xmm0
movss  -0xc(%rbp),%xmm1
lea    0xd5f(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,%rsp
mov    -0x4(%rbp),%eax
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x38,%rsp
lea    0xecc(%rip),%rdi
lea    -0x2c(%rbp),%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
lea    -0x34(%rbp),%rdx
lea    0xeb9(%rip),%rdi
lea    -0x38(%rbp),%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
mov    %rsp,%r15
mov    -0x2c(%rbp),%eax
mov    %rsp,%r12
lea    0xf(,%rax,8),%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%r12
mov    %r12,%rsp
cmpl   $0x0,-0x2c(%rbp)
jle    122e <main+0x10e>
lea    0xe82(%rip),%r14
mov    %r12,%rbx
xor    %r13d,%r13d
nopl   0x0(%rax,%rax,1)
lea    0x4(%rbx),%rdx
mov    %r14,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
add    $0x1,%r13
movslq -0x2c(%rbp),%rax
add    $0x8,%rbx
cmp    %rax,%r13
jl     1190 <main+0x70>
test   %eax,%eax
jle    122e <main+0x10e>
movss  0xe42(%rip),%xmm2
movsd  -0x38(%rbp),%xmm0
xor    %ebx,%ebx
lea    0xe41(%rip),%r14
nopl   0x0(%rax)
movaps %xmm2,-0x60(%rbp)
movsd  (%r12,%rbx,8),%xmm1
subps  %xmm0,%xmm1
shufps $0x0,%xmm2,%xmm2
movaps %xmm1,%xmm0
divps  %xmm2,%xmm0
addps  %xmm1,%xmm0
movaps %xmm0,-0x50(%rbp)
movaps %xmm0,%xmm1
shufps $0x55,%xmm0,%xmm1
mov    %r14,%rdi
call   1030 <printf@plt>
movaps -0x60(%rbp),%xmm2
movsd  -0x38(%rbp),%xmm0
addps  -0x50(%rbp),%xmm0
movaps %xmm0,%xmm1
shufps $0x55,%xmm0,%xmm1
movss  %xmm0,-0x38(%rbp)
movss  %xmm1,-0x34(%rbp)
addss  %xmm2,%xmm2
add    $0x1,%rbx
movslq -0x2c(%rbp),%rax
cmp    %rax,%rbx
jl     11d0 <main+0xb0>
jmp    1233 <main+0x113>
movsd  -0x38(%rbp),%xmm0
movaps %xmm0,%xmm1
shufps $0x55,%xmm0,%xmm1
lea    0xdcc(%rip),%rdi
call   1030 <printf@plt>
mov    %r15,%rsp
xor    %eax,%eax
lea    -0x28(%rbp),%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [6 x i8] c"%f %f\00"
@.str.2 = [13 x i8] c"%0.2f %0.2f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [2 x float]
%4 = alloca i8*
%5 = alloca i64
%6 = alloca i32
%7 = alloca float
%8 = alloca float
%9 = alloca float
store i32 0, i32* %1
%10 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%11 = getelementptr inbounds [2 x float], [2 x float]* %3, i64 0, i64 0
%12 = getelementptr inbounds [2 x float], [2 x float]* %3, i64 0, i64 1
%13 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), float* %11, float* %12)
%14 = load i32, i32* %2
%15 = zext i32 %14 to i64
%16 = call i8* @llvm.stacksave()
store i8* %16, i8** %4
%17 = alloca [2 x float], i64 %15
store i64 %15, i64* %5
store i32 0, i32* %6
br label %18
18: ; preds = %32, %0
%19 = load i32, i32* %6
%20 = load i32, i32* %2
%21 = icmp slt i32 %19, %20
br i1 %21, label %22, label %35
22: ; preds = %18
%23 = load i32, i32* %6
%24 = sext i32 %23 to i64
%25 = getelementptr inbounds [2 x float], [2 x float]* %17, i64 %24
%26 = getelementptr inbounds [2 x float], [2 x float]* %25, i64 0, i64 0
%27 = load i32, i32* %6
%28 = sext i32 %27 to i64
%29 = getelementptr inbounds [2 x float], [2 x float]* %17, i64 %28
%30 = getelementptr inbounds [2 x float], [2 x float]* %29, i64 0, i64 1
%31 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), float* %26, float* %30)
br label %32
32: ; preds = %22
%33 = load i32, i32* %6
%34 = add nsw i32 %33, 1
store i32 %34, i32* %6
br label %18
35: ; preds = %18
store float 1.000000e+00, float* %7
store i32 0, i32* %6
br label %36
36: ; preds = %82, %35
%37 = load i32, i32* %6
%38 = load i32, i32* %2
%39 = icmp slt i32 %37, %38
br i1 %39, label %40, label %85
40: ; preds = %36
%41 = load i32, i32* %6
%42 = sext i32 %41 to i64
%43 = getelementptr inbounds [2 x float], [2 x float]* %17, i64 %42
%44 = getelementptr inbounds [2 x float], [2 x float]* %43, i64 0, i64 0
%45 = load float, float* %44
%46 = getelementptr inbounds [2 x float], [2 x float]* %3, i64 0, i64 0
%47 = load float, float* %46
%48 = fsub float %45, %47
store float %48, float* %8
%49 = load i32, i32* %6
%50 = sext i32 %49 to i64
%51 = getelementptr inbounds [2 x float], [2 x float]* %17, i64 %50
%52 = getelementptr inbounds [2 x float], [2 x float]* %51, i64 0, i64 1
%53 = load float, float* %52
%54 = getelementptr inbounds [2 x float], [2 x float]* %3, i64 0, i64 1
%55 = load float, float* %54
%56 = fsub float %53, %55
store float %56, float* %9
%57 = load float, float* %8
%58 = load float, float* %8
%59 = load float, float* %7
%60 = fdiv float %58, %59
%61 = fadd float %57, %60
store float %61, float* %8
%62 = load float, float* %9
%63 = load float, float* %9
%64 = load float, float* %7
%65 = fdiv float %63, %64
%66 = fadd float %62, %65
store float %66, float* %9
%67 = load float, float* %8
%68 = load float, float* %9
%69 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0), float %67, float %68)
%70 = getelementptr inbounds [2 x float], [2 x float]* %3, i64 0, i64 0
%71 = load float, float* %70
%72 = load float, float* %8
%73 = fadd float %71, %72
%74 = getelementptr inbounds [2 x float], [2 x float]* %3, i64 0, i64 0
store float %73, float* %74
%75 = getelementptr inbounds [2 x float], [2 x float]* %3, i64 0, i64 1
%76 = load float, float* %75
%77 = load float, float* %9
%78 = fadd float %76, %77
%79 = getelementptr inbounds [2 x float], [2 x float]* %3, i64 0, i64 1
store float %78, float* %79
%80 = load float, float* %7
%81 = fmul float %80, 2.000000e+00
store float %81, float* %7
br label %82
82: ; preds = %40
%83 = load i32, i32* %6
%84 = add nsw i32 %83, 1
store i32 %84, i32* %6
br label %36
85: ; preds = %36
%86 = getelementptr inbounds [2 x float], [2 x float]* %3, i64 0, i64 0
%87 = load float, float* %86
%88 = getelementptr inbounds [2 x float], [2 x float]* %3, i64 0, i64 1
%89 = load float, float* %88
%90 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0), float %87, float %89)
store i32 0, i32* %1
%91 = load i8*, i8** %4
%92 = load i32, i32* %1
ret i32 %92
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [6 x i8] c"%f %f\00"
@.str.2 = [13 x i8] c"%0.2f %0.2f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca <2 x float>
%3 = bitcast i32* %1 to i8*
%4 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%5 = bitcast <2 x float>* %2 to i8*
%6 = getelementptr inbounds <2 x float>, <2 x float>* %2, i64 0, i64 0
%7 = getelementptr inbounds <2 x float>, <2 x float>* %2, i64 0, i64 1
%8 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), float* %6, float* %7)
%9 = load i32, i32* %1
%10 = zext i32 %9 to i64
%11 = call i8* @llvm.stacksave()
%12 = alloca [2 x float], i64 %10
%13 = load i32, i32* %1
%14 = icmp sgt i32 %13, 0
br i1 %14, label %21, label %17
15: ; preds = %21
%16 = icmp sgt i32 %27, 0
br i1 %16, label %19, label %17
17: ; preds = %0, %15
%18 = load <2 x float>, <2 x float>* %2
br label %54
19: ; preds = %15
%20 = load <2 x float>, <2 x float>* %2
br label %30
21: ; preds = %0, %21
%22 = phi i64 [ %26, %21 ], [ 0, %0 ]
%23 = getelementptr inbounds [2 x float], [2 x float]* %12, i64 %22, i64 0
%24 = getelementptr inbounds [2 x float], [2 x float]* %12, i64 %22, i64 1
%25 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), float* %23, float* %24)
%26 = add nuw nsw i64 %22, 1
%27 = load i32, i32* %1
%28 = sext i32 %27 to i64
%29 = icmp slt i64 %26, %28
br i1 %29, label %21, label %15
30: ; preds = %19, %30
%31 = phi i64 [ 0, %19 ], [ %50, %30 ]
%32 = phi float [ 1.000000e+00, %19 ], [ %49, %30 ]
%33 = phi <2 x float> [ %20, %19 ], [ %46, %30 ]
%34 = getelementptr inbounds [2 x float], [2 x float]* %12, i64 %31, i64 0
%35 = bitcast float* %34 to <2 x float>*
%36 = load <2 x float>, <2 x float>* %35
%37 = fsub <2 x float> %36, %33
%38 = insertelement <2 x float> poison, float %32, i64 0
%39 = shufflevector <2 x float> %38, <2 x float> poison, <2 x i32> zeroinitializer
%40 = fdiv <2 x float> %37, %39
%41 = fadd <2 x float> %37, %40
%42 = extractelement <2 x float> %41, i64 0
%43 = extractelement <2 x float> %41, i64 1
%44 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0), float %42, float %43)
%45 = load <2 x float>, <2 x float>* %2
%46 = fadd <2 x float> %41, %45
%47 = extractelement <2 x float> %46, i64 0
store float %47, float* %6
%48 = extractelement <2 x float> %46, i64 1
store float %48, float* %7
%49 = fmul float %32, 2.000000e+00
%50 = add nuw nsw i64 %31, 1
%51 = load i32, i32* %1
%52 = sext i32 %51 to i64
%53 = icmp slt i64 %50, %52
br i1 %53, label %30, label %54
54: ; preds = %30, %17
%55 = phi <2 x float> [ %18, %17 ], [ %46, %30 ]
%56 = extractelement <2 x float> %55, i64 0
%57 = extractelement <2 x float> %55, i64 1
%58 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0), float %56, float %57)
ret i32 0
}