QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#396416 | #2466. Autići | lfxxx# | 50 ✓ | 7ms | 4284kb | C++17 | 683b | 2024-04-22 18:37:30 | 2024-07-04 03:36:45 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define ull unsigned long long
#define pii pair<int, int>
#define pll pair<ll, ll>
#define all(x) (x).begin(), (x).end()
bool be;
constexpr int N = 1e5 + 5;
int a[N];
bool en;
int main() {
cerr << (&be - &en) / 1024.0 / 1024 << " MB\n--------------------------------" << endl;
#ifdef IAKIOI
freopen("in.in", "r", stdin);
// freopen("out.out", "w", stdout);
#endif
ios::sync_with_stdio(false);
cin.tie(nullptr);
int n;
ll sum = 0;
cin >> n;
for (int i = 1; i <= n; ++i) cin >> a[i], sum += a[i];
sum += (n - 2ll) * *min_element(a + 1, a + 1 + n);
cout << sum << endl;
return 0;
}
详细
Subtask #1:
score: 10
Accepted
Test #1:
score: 10
Accepted
time: 1ms
memory: 3892kb
input:
1 1000000000
output:
0
result:
ok single line: '0'
Test #2:
score: 0
Accepted
time: 3ms
memory: 4232kb
input:
94170 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 1 1 1 1 1 ...
output:
188338
result:
ok single line: '188338'
Test #3:
score: 0
Accepted
time: 3ms
memory: 4228kb
input:
94360 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 1000000000 10000000...
output:
188718000000000
result:
ok single line: '188718000000000'
Test #4:
score: 0
Accepted
time: 6ms
memory: 4228kb
input:
95508 75940263 75940263 75940263 75940263 75940263 75940263 75940263 75940263 75940263 75940263 75940263 75940263 75940263 75940263 75940263 75940263 75940263 75940263 75940263 75940263 75940263 75940263 75940263 75940263 75940263 75940263 75940263 75940263 75940263 75940263 75940263 75940263 759402...
output:
14505653396682
result:
ok single line: '14505653396682'
Test #5:
score: 0
Accepted
time: 6ms
memory: 4224kb
input:
99671 967034924 967034924 967034924 967034924 967034924 967034924 967034924 967034924 967034924 967034924 967034924 967034924 967034924 967034924 967034924 967034924 967034924 967034924 967034924 967034924 967034924 967034924 967034924 967034924 967034924 967034924 967034924 967034924 967034924 9670...
output:
192768741750160
result:
ok single line: '192768741750160'
Test #6:
score: 0
Accepted
time: 3ms
memory: 4204kb
input:
92220 59249204 59249204 59249204 59249204 59249204 59249204 59249204 59249204 59249204 59249204 59249204 59249204 59249204 59249204 59249204 59249204 59249204 59249204 59249204 59249204 59249204 59249204 59249204 59249204 59249204 59249204 59249204 59249204 59249204 59249204 59249204 59249204 592492...
output:
10927804687352
result:
ok single line: '10927804687352'
Subtask #2:
score: 20
Accepted
Test #7:
score: 20
Accepted
time: 0ms
memory: 3824kb
input:
1 1000000000
output:
0
result:
ok single line: '0'
Test #8:
score: 0
Accepted
time: 1ms
memory: 3904kb
input:
2 1000000000 1
output:
1000000001
result:
ok single line: '1000000001'
Test #9:
score: 0
Accepted
time: 1ms
memory: 3900kb
input:
944 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 1 1 1 1 1 1 ...
output:
1886
result:
ok single line: '1886'
Test #10:
score: 0
Accepted
time: 1ms
memory: 3900kb
input:
955 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 1000000000 1000000000...
output:
1908000000000
result:
ok single line: '1908000000000'
Test #11:
score: 0
Accepted
time: 1ms
memory: 3896kb
input:
997 967034924 967034924 967034924 967034924 967034924 967034924 967034924 967034924 967034924 967034924 967034924 967034924 967034924 967034924 967034924 967034924 967034924 967034924 967034924 967034924 967034924 967034924 967034924 967034924 967034924 967034924 967034924 967034924 967034924 967034...
output:
1926333568608
result:
ok single line: '1926333568608'
Test #12:
score: 0
Accepted
time: 1ms
memory: 3948kb
input:
922 994190896 951880676 281212206 449808722 583676727 155693806 716104174 485241892 881636507 439502033 615896284 581772777 377936310 260813336 927135057 145944482 756600366 852143433 939151419 533101376 319674984 229233127 879988037 178327996 353547306 278458698 504030676 187126873 377162612 734405...
output:
541951724870
result:
ok single line: '541951724870'
Test #13:
score: 0
Accepted
time: 0ms
memory: 3856kb
input:
990 506359517 944319307 402455841 386308209 621395233 433524252 782415464 427665210 735718641 792022982 656254638 736133182 596554892 702085716 802077366 947168417 670094448 896919935 883225531 635615994 727285510 528126002 770823731 467854228 818423770 874955301 943337959 695065907 652241352 842152...
output:
1022744732168
result:
ok single line: '1022744732168'
Test #14:
score: 0
Accepted
time: 0ms
memory: 3904kb
input:
907 914048619 518098532 620694131 865555332 635447930 508684427 706667906 470766801 244103474 318615518 305994927 604341461 474690808 257770369 673499271 697449978 827557594 990398243 934510054 528292225 571329416 581638348 300742363 823348900 491618661 821619610 840272063 427400098 541291967 632474...
output:
785033237798
result:
ok single line: '785033237798'
Test #15:
score: 0
Accepted
time: 1ms
memory: 3912kb
input:
988 11934038 257096283 933290530 405355767 570001955 876668629 249890139 453495728 12239373 657165788 462212374 822553808 432021485 431563805 561217651 936397991 513669276 994755652 596309475 157329680 583456292 753259864 817005401 432371535 764906373 878606404 665378586 22850648 457512559 378828995...
output:
496833263039
result:
ok single line: '496833263039'
Test #16:
score: 0
Accepted
time: 1ms
memory: 3840kb
input:
901 391337048 538883744 535937150 532332526 8099343 143698367 339543270 152590624 14304401 234675590 941909102 449369743 147668299 266396607 148834877 90258367 425079198 370976343 531131241 179074744 338989816 943345633 401527024 788833071 41605751 750660847 753281912 614996176 145411643 964227808 1...
output:
445564826872
result:
ok single line: '445564826872'
Test #17:
score: 0
Accepted
time: 1ms
memory: 3896kb
input:
977 320792352 22282234 531061892 680374609 475683677 804022047 893258024 535267831 626336952 241373565 27027944 212668381 761506303 816613635 285149459 181581377 283041403 94854155 161467006 735899498 734244445 876819546 4239420 360854115 549962254 956506967 872545115 212731679 657694864 32874377 77...
output:
480416863910
result:
ok single line: '480416863910'
Test #18:
score: 0
Accepted
time: 1ms
memory: 3916kb
input:
918 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 1000000000 1000000000...
output:
917000000917
result:
ok single line: '917000000917'
Subtask #3:
score: 20
Accepted
Test #19:
score: 20
Accepted
time: 0ms
memory: 3944kb
input:
1 1000000000
output:
0
result:
ok single line: '0'
Test #20:
score: 0
Accepted
time: 0ms
memory: 3900kb
input:
2 1000000000 1
output:
1000000001
result:
ok single line: '1000000001'
Test #21:
score: 0
Accepted
time: 3ms
memory: 4272kb
input:
94360 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 1 1 1 1 1 ...
output:
188718
result:
ok single line: '188718'
Test #22:
score: 0
Accepted
time: 0ms
memory: 4084kb
input:
95508 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 1000000000 10000000...
output:
191014000000000
result:
ok single line: '191014000000000'
Test #23:
score: 0
Accepted
time: 6ms
memory: 4248kb
input:
99671 967034924 967034924 967034924 967034924 967034924 967034924 967034924 967034924 967034924 967034924 967034924 967034924 967034924 967034924 967034924 967034924 967034924 967034924 967034924 967034924 967034924 967034924 967034924 967034924 967034924 967034924 967034924 967034924 967034924 9670...
output:
192768741750160
result:
ok single line: '192768741750160'
Test #24:
score: 0
Accepted
time: 6ms
memory: 4212kb
input:
92220 994190896 951880676 281212206 449808722 583676727 155693806 716104174 485241892 881636507 439502033 615896284 581772777 377936310 260813336 927135057 145944482 756600366 852143433 939151419 533101376 319674984 229233127 879988037 178327996 353547306 278458698 504030676 187126873 377162612 7344...
output:
54366752623309
result:
ok single line: '54366752623309'
Test #25:
score: 0
Accepted
time: 6ms
memory: 4156kb
input:
98929 506359517 944319307 402455841 386308209 621395233 433524252 782415464 427665210 735718641 792022982 656254638 736133182 596554892 702085716 802077366 947168417 670094448 896919935 883225531 635615994 727285510 528126002 770823731 467854228 818423770 874955301 943337959 695065907 652241352 8421...
output:
102220128961309
result:
ok single line: '102220128961309'
Test #26:
score: 0
Accepted
time: 6ms
memory: 4060kb
input:
90763 914048619 518098532 620694131 865555332 635447930 508684427 706667906 470766801 674562676 318615518 305994927 604341461 474690808 257770369 673499271 697449978 827557594 990398243 934510054 528292225 571329416 581638348 300742363 823348900 491618661 821619610 840272063 427400098 541291967 6324...
output:
78644830371374
result:
ok single line: '78644830371374'
Test #27:
score: 0
Accepted
time: 6ms
memory: 4284kb
input:
98735 11934038 257096283 933290530 405355767 570001955 876668629 249890139 453495728 12239373 657165788 462212374 822553808 432021485 431563805 561217651 936397991 513669276 994755652 596309475 157329680 583456292 753259864 817005401 432371535 764906373 878606404 665378586 22850648 457512559 3788289...
output:
49232803794099
result:
ok single line: '49232803794099'
Test #28:
score: 0
Accepted
time: 6ms
memory: 4252kb
input:
90103 391337048 538883744 535937150 532332526 8099343 143698367 339543270 152590624 14304401 234675590 941909102 449369743 147668299 266396607 148834877 90258367 425079198 370976343 531131241 179074744 338989816 943345633 401527024 788833071 41605751 750660847 753281912 614996176 145411643 964227808...
output:
44953992863447
result:
ok single line: '44953992863447'
Test #29:
score: 0
Accepted
time: 7ms
memory: 4236kb
input:
97713 320792352 22282234 531061892 680374609 475683677 804022047 893258024 535267831 626336952 241373565 27027944 212668381 761506303 816613635 285149459 181581377 283041403 94854155 161467006 735899498 734244445 876819546 4239420 360854115 549962254 956506967 872545115 212731679 657694864 32874377 ...
output:
48794855150115
result:
ok single line: '48794855150115'
Test #30:
score: 0
Accepted
time: 6ms
memory: 4196kb
input:
91802 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 1000000000 10000000...
output:
91801000091801
result:
ok single line: '91801000091801'
Extra Test:
score: 0
Extra Test Passed