用户输出
2
8 48
系统信息
Exited with return code 0
编号 | 题目 | 状态 | 分数 | 总时间 | 内存 | 代码 / 答案文件 | 提交者 | 提交时间 |
---|---|---|---|---|---|---|---|---|
#102004 | #1429. [L1-6] 序列变换 | Accepted | 100 | 181 ms | 1204 K | C++ 11 / 379 B | hwpvector | 2024-03-16 21:23:16 |
#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 10;
int n, b[N], a[N];
int main() {
cin >> n;
if (n % 2 == 1) {
printf("Inf\n");
return 0;
}
for (int i = 1; i <= n; i++) cin >> b[i];
a[2] = b[1], a[n - 1] = b[n];
for (int j = 4; j <= n; j += 2) a[j] = b[j - 1] - a[j - 2];
for (int j = n - 3; j >= 1; j -= 2) a[j] = b[j + 1] - a[j + 2];
cout << n << endl;
for (int i = 1; i <= n; i++) cout << a[i] << ' ';
}
用户输出
10
-1 0 -1 -1 0 -1 -1 -1 1 1
系统信息
Exited with return code 0
用户输出
10
0 -1 -1 1 0 1 1 -1 -1 -1
系统信息
Exited with return code 0
1000
-293 119 -631 246 -101 -236 -68 25 -606 626 -559 -213 -155 -1 462 806 339 365 -46 496 454 504 6
<4192 bytes omitted>
1000
-32 -293 151 -338 95 237 -331 -305 356 -301 270 -258 -483 103 482 359 324 -20 41 -26 455 480 49
<4192 bytes omitted>
用户输出
1000
-32 -293 151 -338 95 237 -331 -305 356 -301 270 -258 -483 103 482 359 324 -20 41 -26 455 480 49 167 445 -276 -53 -477 -138
<4165 bytes omitted>
系统信息
Exited with return code 0
1000
9 -449 -61 -108 271 -112 739 -80 648 634 -123 531 -361 135 16 -240 154 127 148 529 -190 -213 -8
<4182 bytes omitted>
1000
-210 9 -239 -70 131 341 -243 398 163 250 471 -373 60 12 75 4 -315 150 442 -2 87 -188 -300 107 8
<4182 bytes omitted>
用户输出
1000
-210 9 -239 -70 131 341 -243 398 163 250 471 -373 60 12 75 4 -315 150 442 -2 87 -188 -300 107 81 -390 342 -217 -494 -487 24
<4155 bytes omitted>
系统信息
Exited with return code 0
10001
61 273 120 -18 40 236 -372 50 -666 -99 -791 321 -367 182 507 453 362 19 28 -941 306 -969 671 -
<42744 bytes omitted>
用户输出
Inf
系统信息
Exited with return code 0
100000
-245033200 269057026 -444307583 12738569 -2572768 -10255372 -2437516 -41423001 44403267 -2472
<1016729 bytes omitted>
100000
108942099 -245033200 160114927 -199274383 -147376358 196701615 137120986 -199139131 -17854398
<1011741 bytes omitted>
用户输出
100000
108942099 -245033200 160114927 -199274383 -147376358 196701615 137120986 -199139131 -178543987 243542398 -68747560 220332
<1011714 bytes omitted>
系统信息
Exited with return code 0
100000
142956745 326311724 185848189 102625101 200830050 -115640813 333907651 -166296483 399441282 -
<1015936 bytes omitted>
100000
109781724 142956745 216530000 42891444 -113904899 157938606 -1735914 175969045 -164560569 223
<1011548 bytes omitted>
用户输出
100000
109781724 142956745 216530000 42891444 -113904899 157938606 -1735914 175969045 -164560569 223472237 -223759388 -138607069
<1011521 bytes omitted>
系统信息
Exited with return code 0
100000
-54394293 -28181679 128662233 -260235512 307048828 -340128627 21628743 -100509964 -32690440 2
<1016350 bytes omitted>
100000
110545068 -54394293 -138726747 183056526 -121508765 123992302 -218619862 -102363559 118109898
<1012125 bytes omitted>
用户输出
100000
110545068 -54394293 -138726747 183056526 -121508765 123992302 -218619862 -102363559 118109898 69673119 173468942 84192097
<1012098 bytes omitted>
系统信息
Exited with return code 0