QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#178186 | #6342. Security Guard | rgnerdplayer | 25 | 13ms | 4008kb | C++20 | 583b | 2023-09-13 19:16:33 | 2023-09-13 19:16:33 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
using i64 = long long;
int main() {
cin.tie(nullptr)->sync_with_stdio(false);
auto solve = [&]() {
int n, m, q;
cin >> n >> m >> q;
vector<int> s(n);
for (int i = 0; i < n; i++) {
cin >> s[i];
}
i64 ans = 0;
for (int i = 1; i < n - 1; i++) {
ans += s[i];
}
int mx = *max_element(s.begin(), s.end());
ans += mx;
cout << ans << '\n';
};
solve();
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Subtask #1:
score: 12
Accepted
Test #1:
score: 12
Accepted
time: 6ms
memory: 3896kb
input:
200000 199999 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...
output:
199999
result:
ok 1 number(s): "199999"
Test #2:
score: 0
Accepted
time: 7ms
memory: 3884kb
input:
200000 199999 0 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 ...
output:
399998
result:
ok 1 number(s): "399998"
Test #3:
score: 0
Accepted
time: 6ms
memory: 3840kb
input:
200000 199999 0 1 2 1 1 1 2 2 1 2 1 1 2 2 2 2 1 1 2 1 1 1 1 2 2 2 1 1 2 2 1 1 1 2 1 1 2 1 1 1 1 1 1 1 2 1 2 2 1 2 1 1 2 1 2 2 2 2 1 2 2 1 2 1 2 2 2 1 1 1 2 1 1 1 2 2 1 1 1 2 2 2 2 1 1 2 2 1 1 2 1 2 1 2 1 2 1 2 1 1 2 1 2 1 2 1 2 1 1 2 1 1 1 2 2 2 1 2 1 1 1 2 1 2 2 2 1 2 1 1 1 1 2 2 1 1 2 1 2 1 2 1 2 ...
output:
299700
result:
ok 1 number(s): "299700"
Test #4:
score: 0
Accepted
time: 3ms
memory: 3916kb
input:
200000 199999 0 2 2 1 2 1 2 2 2 1 1 2 2 1 2 1 2 1 1 2 2 2 2 1 1 2 2 2 1 1 1 1 1 2 2 1 2 2 2 2 1 2 1 2 2 1 1 2 1 1 2 2 2 1 1 2 2 2 2 2 2 2 2 1 2 2 2 1 2 2 2 2 2 2 2 1 1 1 2 1 1 1 1 2 1 1 1 2 2 2 2 1 2 2 2 1 1 1 2 1 2 2 1 2 1 1 1 1 2 1 1 1 1 1 2 1 2 1 2 2 2 2 2 1 2 2 1 2 1 2 1 1 2 1 2 2 1 2 2 1 2 1 1 ...
output:
300131
result:
ok 1 number(s): "300131"
Test #5:
score: 0
Accepted
time: 6ms
memory: 4008kb
input:
200000 199999 0 1 2 2 1 1 1 1 2 2 1 2 2 1 2 1 1 1 1 2 1 1 2 1 1 1 1 2 1 1 1 1 2 2 2 1 2 1 1 2 1 2 2 1 1 2 2 2 2 1 2 1 2 2 1 1 1 2 1 1 2 1 1 2 2 1 2 2 2 2 2 1 2 2 2 1 2 2 1 1 2 2 2 1 2 2 2 1 1 2 1 2 2 2 1 2 2 1 2 1 1 2 1 2 2 2 1 2 1 1 1 1 2 1 1 1 2 1 2 2 2 1 2 2 1 2 1 1 1 1 1 2 1 1 2 1 2 1 1 2 2 2 2 ...
output:
300132
result:
ok 1 number(s): "300132"
Test #6:
score: 0
Accepted
time: 3ms
memory: 3932kb
input:
200000 199999 0 2 1 1 2 2 2 1 1 2 2 1 2 2 2 1 1 1 2 1 2 2 1 1 1 1 2 1 2 1 1 1 1 2 2 1 1 1 1 2 1 2 2 2 2 1 1 1 1 2 2 2 1 1 2 2 2 1 2 2 2 1 1 1 1 1 1 1 2 2 2 2 1 2 2 1 2 1 1 1 2 2 1 2 2 1 1 1 2 2 2 2 2 2 2 2 1 1 2 1 2 2 1 2 1 2 1 1 1 1 2 1 1 2 2 2 2 1 1 1 2 1 2 1 1 1 1 2 1 1 1 1 1 1 2 1 2 1 2 1 2 1 1 ...
output:
300094
result:
ok 1 number(s): "300094"
Test #7:
score: 0
Accepted
time: 0ms
memory: 3576kb
input:
2 1 0 2 1 1 2
output:
2
result:
ok 1 number(s): "2"
Subtask #2:
score: 13
Accepted
Dependency #1:
100%
Accepted
Test #8:
score: 13
Accepted
time: 12ms
memory: 3852kb
input:
200000 199999 0 888688136 635144878 255996991 457498818 501986248 161166265 760280211 255673948 435333678 521749421 41382586 784453705 702026010 746126 770719498 150796793 890458633 167539898 952822340 613539963 472897894 866040523 778440023 870323479 702145156 736556675 190255428 993487185 74569854...
output:
99991732542677
result:
ok 1 number(s): "99991732542677"
Test #9:
score: 0
Accepted
time: 9ms
memory: 3916kb
input:
200000 199999 0 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 100000000...
output:
199999000000000
result:
ok 1 number(s): "199999000000000"
Test #10:
score: 0
Accepted
time: 7ms
memory: 3960kb
input:
200000 199999 0 994 5896 9483 12355 19728 24786 37166 41115 48477 49060 51336 61764 62276 64085 69469 70046 70342 76009 76047 77866 83444 88315 93003 101882 102439 115518 123564 126489 128853 129342 135936 138010 138667 139203 145762 146987 147190 149373 149615 157973 158278 162698 167978 171042 175...
output:
100080650219840
result:
ok 1 number(s): "100080650219840"
Test #11:
score: 0
Accepted
time: 12ms
memory: 3880kb
input:
200000 199999 0 999979375 999979056 999977631 999969139 999969059 999968218 999965977 999964154 999963336 999962193 999949370 999945779 999935677 999930665 999922468 999916390 999909525 999894572 999883487 999873968 999867979 999867403 999865926 999860824 999860075 999845853 999845152 999844663 9998...
output:
100207782866930
result:
ok 1 number(s): "100207782866930"
Test #12:
score: 0
Accepted
time: 12ms
memory: 3988kb
input:
200000 199999 0 7869 327930555 260846420 794808410 502941904 411659428 130207885 612162720 504413407 18761445 863244627 896146594 998979189 104704277 991405413 249077560 74683811 82341504 801586757 961844951 329658898 519489393 391322365 176325343 668128590 140579049 585287703 271548306 934655750 73...
output:
100077877975415
result:
ok 1 number(s): "100077877975415"
Test #13:
score: 0
Accepted
time: 9ms
memory: 3988kb
input:
200000 199999 0 999999712 881643707 435809178 684158484 863581784 731961708 185392983 345993271 858967503 700991749 445253242 127512192 507651836 285959415 559560102 489162406 745169466 502306045 221121071 897080407 534280273 740385163 179375193 459472967 186920255 396206170 580100609 474627515 1895...
output:
99924146368063
result:
ok 1 number(s): "99924146368063"
Test #14:
score: 0
Accepted
time: 13ms
memory: 3944kb
input:
200000 199999 0 2318 644514716 771740123 172494898 506479467 277861513 1718728 772329873 128164907 648051857 976129300 340343571 313675124 57410012 698648189 320365186 170436389 762471240 303688530 972439412 769423137 633817440 202438676 658846441 921753866 360290970 463617398 907628038 449272286 52...
output:
99901846804322
result:
ok 1 number(s): "99901846804322"
Test #15:
score: 0
Accepted
time: 8ms
memory: 3880kb
input:
200000 199999 0 596 480572608 206680083 710577253 753679652 951511383 347984183 525757321 212513624 4689186 597648153 486377551 10137051 663490585 928622677 977392246 501049475 49856763 479649250 962546801 700479992 161518533 848997160 8623311 666288000 33482963 822409871 649141657 827719637 2986910...
output:
100053631296741
result:
ok 1 number(s): "100053631296741"
Subtask #3:
score: 0
Wrong Answer
Dependency #2:
100%
Accepted
Test #16:
score: 0
Wrong Answer
time: 12ms
memory: 3880kb
input:
200000 199999 0 914481135 246465161 578713167 122034612 360205646 243313836 503911461 62137819 868863787 802884496 618725473 292817201 920732219 769519242 254063829 818858999 999225205 237536786 765397639 168830615 838535361 255328583 977944440 726449619 513972057 331170498 152277283 429709926 87555...
output:
100085792738479
result:
wrong answer 1st numbers differ - expected: '100069182381812', found: '100085792738479'
Subtask #4:
score: 0
Skipped
Dependency #3:
0%
Subtask #5:
score: 0
Wrong Answer
Test #85:
score: 0
Wrong Answer
time: 0ms
memory: 3636kb
input:
16 15 200000 692461146 622302385 805066691 422290641 600839873 940930580 873147413 489653843 239129952 383473127 21389393 913787109 856138328 859082963 262475462 327598064 6 13 6 9 6 15 6 14 6 16 6 8 5 6 1 6 4 6 3 6 6 11 6 7 6 10 2 6 6 12
output:
9230638340
result:
wrong answer 1st numbers differ - expected: '14113958700', found: '9230638340'
Subtask #6:
score: 0
Skipped
Dependency #5:
0%
Subtask #7:
score: 0
Skipped
Dependency #1:
100%
Accepted
Dependency #2:
100%
Accepted
Dependency #3:
0%