Submission #6277749


Source Code Expand

Copy
import numpy as np
N = int(input())
A = np.array(input().split(), dtype=np.int64)

total = A.sum() // 2
first = total - A[1::2].sum()

B = [first]
for a in A[:-1]:
  B.append(a-B[-1])
  
print(' '.join(str(2*x) for x in B))

Submission Info

Submission Time
Task D - Rain Flows into Dams
User maspy
Language Python (3.4.3)
Score 400
Code Size 234 Byte
Status AC
Exec Time 668 ms
Memory 24944 KB

Judge Result

Set Name All Sample
Score / Max Score 400 / 400 0 / 0
Status
AC × 18
AC × 3
Set Name Test Cases
All sample_01, sample_02, sample_03, testcase_01, testcase_02, testcase_03, testcase_04, testcase_05, testcase_06, testcase_07, testcase_08, testcase_09, testcase_10, testcase_11, testcase_12, testcase_13, testcase_14, testcase_15
Sample sample_01, sample_02, sample_03
Case Name Status Exec Time Memory
sample_01 AC 146 ms 12444 KB
sample_02 AC 146 ms 12404 KB
sample_03 AC 146 ms 12404 KB
testcase_01 AC 420 ms 19248 KB
testcase_02 AC 481 ms 21088 KB
testcase_03 AC 661 ms 24944 KB
testcase_04 AC 167 ms 12644 KB
testcase_05 AC 634 ms 23532 KB
testcase_06 AC 643 ms 23532 KB
testcase_07 AC 348 ms 16704 KB
testcase_08 AC 650 ms 23536 KB
testcase_09 AC 388 ms 17740 KB
testcase_10 AC 148 ms 12280 KB
testcase_11 AC 649 ms 24320 KB
testcase_12 AC 668 ms 24660 KB
testcase_13 AC 652 ms 24944 KB
testcase_14 AC 148 ms 12404 KB
testcase_15 AC 623 ms 23264 KB