481
-627 632 -342 911 -452 -104 -32 -718 92 -725 -565 311 415 -273 459 773 545 -319 -191 685 -394 3
<2020 bytes omitted>
用户输出
12898
系统信息
Exited with return code 0
编号 | 题目 | 状态 | 分数 | 总时间 | 内存 | 代码 / 答案文件 | 提交者 | 提交时间 |
---|---|---|---|---|---|---|---|---|
#63384 | #1289. 最大连续子序列 | Accepted | 100 | 356 ms | 400 K | C++ 11 / 316 B | 计试001 朱天宇 | 2021-07-26 20:35:38 |
#include <iostream>
using namespace std;
int main() {
int n;
cin >> n;
int max = 0;
int sum = 0;
int tem;
for (int i = 0; i < n; i++) {
cin >> tem;
sum += tem;
if (sum < 0) {
sum = 0;
continue;
}
if (sum > max) {
max = sum;
}
}
cout << max;
return 0;
}
481
-627 632 -342 911 -452 -104 -32 -718 92 -725 -565 311 415 -273 459 773 545 -319 -191 685 -394 3
<2020 bytes omitted>
用户输出
12898
系统信息
Exited with return code 0
566
-551 -518 -267 -536 -324 -657 -939 -190 394 -939 -352 124 -164 458 -609 -355 369 277 253 -380 7
<2431 bytes omitted>
用户输出
10030
系统信息
Exited with return code 0
用户输出
1231
系统信息
Exited with return code 0
85
-125 -33 179 878 -541 376 356 207 436 -166 -240 366 -155 -782 45 -270 378 325 870 725 235 308 24
<277 bytes omitted>
用户输出
4342
系统信息
Exited with return code 0
821
-791 261 233 -105 79 -276 -150 -953 59 -468 -433 562 -373 -957 -127 979 -261 902 158 -700 780 2
<3489 bytes omitted>
用户输出
37945
系统信息
Exited with return code 0
725
-345 -280 -673 282 -32 333 546 -221 -817 -110 -886 -454 -517 -568 498 285 154 -181 523 43 -116
<3131 bytes omitted>
用户输出
10448
系统信息
Exited with return code 0
958
307 68 -974 -978 -268 564 -556 -685 -638 824 393 812 370 -601 879 604 141 -31 440 740 -238 -927
<4128 bytes omitted>
用户输出
27527
系统信息
Exited with return code 0
875
-511 421 232 932 477 662 402 120 525 642 -399 344 -110 -96 -443 289 -79 -727 -155 -562 -646 -20
<3738 bytes omitted>
用户输出
33599
系统信息
Exited with return code 0
294
73 774 7 242 -762 -662 -110 459 -638 -640 -408 -337 -508 -14 -502 -350 885 199 -780 -758 875 -5
<1207 bytes omitted>
用户输出
7374
系统信息
Exited with return code 0
512
-462 196 814 482 987 -985 -781 -235 94 -956 335 -952 -92 610 493 -378 25 573 -304 -619 500 -804
<2132 bytes omitted>
用户输出
20497
系统信息
Exited with return code 0
469754
663 -949 634 623 377 -411 -842 -401 -321 922 -206 250 -175 -875 -910 -163 670 898 -840 373 1
<2063090 bytes omitted>
用户输出
274973
系统信息
Exited with return code 0
161178
-28 466 361 81 -157 -456 984 555 -796 448 895 -604 -67 963 -516 -937 589 710 -968 -816 -511
<707954 bytes omitted>
用户输出
161885
系统信息
Exited with return code 0
193774
544 -776 -847 307 -539 -989 -767 755 -653 356 -361 -746 -823 891 451 992 -797 -133 -913 365
<850691 bytes omitted>
用户输出
214682
系统信息
Exited with return code 0
373300
-553 -756 -636 649 -135 -407 -579 -325 42 -30 16 168 570 -161 615 -289 -314 266 -268 -631 12
<1639542 bytes omitted>
用户输出
236604
系统信息
Exited with return code 0