QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#19523#2466. AutićiQingyu50 ✓15ms4072kbC++20294b2022-02-03 09:20:512022-05-06 05:41:05

Judging History

你现在查看的是最新测评结果

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2022-05-06 05:41:05]
  • 评测
  • 测评结果:50
  • 用时:15ms
  • 内存:4072kb
  • [2022-02-03 09:20:51]
  • 提交

answer

#include <bits/stdc++.h>
int main() {
	std::ios::sync_with_stdio(false);
	long long n, ans = 0;
	std::cin >> n;
	std::vector<long long> d(n);
	for (auto &x : d) {
		std::cin >> x;
		ans += x;
	}
	ans += (n - 2) * *std::min_element(d.begin(), d.end());
	std::cout << ans << '\n';
}

详细

Subtask #1:

score: 10
Accepted

Test #1:

score: 10
Accepted
time: 1ms
memory: 3560kb

input:

1
1000000000

output:

0

result:

ok single line: '0'

Test #2:

score: 0
Accepted
time: 9ms
memory: 3984kb

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: 15ms
memory: 4072kb

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: 7ms
memory: 3932kb

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: 12ms
memory: 3944kb

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: 14ms
memory: 4004kb

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: 3ms
memory: 3644kb

input:

1
1000000000

output:

0

result:

ok single line: '0'

Test #8:

score: 0
Accepted
time: 3ms
memory: 3696kb

input:

2
1000000000 1

output:

1000000001

result:

ok single line: '1000000001'

Test #9:

score: 0
Accepted
time: 3ms
memory: 3564kb

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: 3ms
memory: 3572kb

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: 4ms
memory: 3656kb

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: 3ms
memory: 3716kb

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: 3568kb

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: 3ms
memory: 3708kb

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: 3ms
memory: 3576kb

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: 3ms
memory: 3616kb

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: 3ms
memory: 3540kb

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: 3540kb

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: 3632kb

input:

1
1000000000

output:

0

result:

ok single line: '0'

Test #20:

score: 0
Accepted
time: 3ms
memory: 3696kb

input:

2
1000000000 1

output:

1000000001

result:

ok single line: '1000000001'

Test #21:

score: 0
Accepted
time: 5ms
memory: 4032kb

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: 6ms
memory: 4032kb

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: 9ms
memory: 3996kb

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: 8ms
memory: 4000kb

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: 8ms
memory: 4000kb

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: 14ms
memory: 4028kb

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: 15ms
memory: 3816kb

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: 14ms
memory: 3816kb

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: 5ms
memory: 3996kb

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: 15ms
memory: 3936kb

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