QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#492098#1853. Swapping Inversions415411#AC ✓117ms15364kbC++142.0kb2024-07-26 09:18:362024-07-26 09:18:37

详细

Test #1:

score: 100
Accepted
time: 2ms
memory: 12828kb

input:

5
1 2 3 4 5

output:

0

result:

ok single line: '0'

Test #2:

score: 0
Accepted
time: 2ms
memory: 13028kb

input:

5
1 2 5 3 4

output:

3

result:

ok single line: '3'

Test #3:

score: 0
Accepted
time: 0ms
memory: 11500kb

input:

1
1

output:

0

result:

ok single line: '0'

Test #4:

score: 0
Accepted
time: 0ms
memory: 11656kb

input:

2
1 2

output:

0

result:

ok single line: '0'

Test #5:

score: 0
Accepted
time: 1ms
memory: 12388kb

input:

2
2 1

output:

1

result:

ok single line: '1'

Test #6:

score: 0
Accepted
time: 51ms
memory: 13600kb

input:

447446
283153 396827 174679 230604 377245 58151 357513 248355 25799 95355 255182 353501 428351 47832 400726 205149 393935 321711 66298 155578 374881 11789 262459 291087 90103 159941 428145 262775 200331 232660 237594 123336 326204 186896 187673 309354 374233 99784 257057 298496 65296 6315 93101 4511...

output:

97316497

result:

ok single line: '97316497'

Test #7:

score: 0
Accepted
time: 79ms
memory: 15280kb

input:

731538
567860 653239 276168 529605 127181 634605 316514 520154 443274 606901 114884 427034 431047 97141 440796 527918 605366 13621 364882 512813 172617 708616 583150 82790 76644 721853 367768 117565 680177 26169 52909 582065 195605 607193 637223 704697 61691 123327 169278 224363 464038 610531 20048 ...

output:

509274024

result:

ok single line: '509274024'

Test #8:

score: 0
Accepted
time: 11ms
memory: 13360kb

input:

107662
8237 102052 104751 49675 9676 44256 29468 84964 98645 3829 90045 31534 35648 98417 71008 42033 71872 94223 100125 86156 57057 36159 72385 9521 47598 30056 84085 106534 66607 62553 55184 84310 68803 106163 3176 84502 102585 86510 106028 52596 10367 56264 1600 40727 42682 97785 46987 8294 50989...

output:

864425499

result:

ok single line: '864425499'

Test #9:

score: 0
Accepted
time: 113ms
memory: 15272kb

input:

1000000
50971 901662 908986 579492 415343 965744 39950 136597 446299 266792 591297 202243 473170 942931 362880 977098 674871 385260 385244 578122 942151 446176 355495 74509 644942 405242 519501 174895 405280 899004 920792 241455 953304 681381 758501 100230 92942 382557 672906 694629 493573 378368 64...

output:

709060680

result:

ok single line: '709060680'

Test #10:

score: 0
Accepted
time: 117ms
memory: 15364kb

input:

1000000
586288 394434 550207 920074 369556 492326 201522 399631 683544 208576 654280 569939 698196 396612 611612 248009 342704 354712 334907 599500 761187 37965 971006 684718 575999 179429 377245 522634 392673 842236 55141 729891 362782 652997 689635 786812 395905 833322 391741 477337 147511 772527 ...

output:

689300847

result:

ok single line: '689300847'

Test #11:

score: 0
Accepted
time: 117ms
memory: 15272kb

input:

1000000
410087 581945 766560 911612 380463 624389 534109 458377 82659 896195 326343 785616 504298 116090 602748 756260 903076 33126 497979 288133 887803 151815 976049 595035 375740 853650 175400 755652 411524 776080 920045 832383 501214 209341 928680 300368 576167 977115 393012 623096 352600 344003 ...

output:

878319168

result:

ok single line: '878319168'

Test #12:

score: 0
Accepted
time: 89ms
memory: 15332kb

input:

1000000
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 ...

output:

0

result:

ok single line: '0'

Test #13:

score: 0
Accepted
time: 87ms
memory: 15296kb

input:

1000000
1000000 999999 999998 999997 999996 999995 999994 999993 999992 999991 999990 999989 999988 999987 999986 999985 999984 999983 999982 999981 999980 999979 999978 999977 999976 999975 999974 999973 999972 999971 999970 999969 999968 999967 999966 999965 999964 999963 999962 999961 999960 9999...

output:

499833345

result:

ok single line: '499833345'

Test #14:

score: 0
Accepted
time: 50ms
memory: 13936kb

input:

437021
353156 162716 53740 76149 368572 25734 402291 83568 219201 242017 338007 344067 199299 251254 84272 131891 435127 79493 323916 15603 168760 293224 371433 120223 358770 75370 400562 235299 121924 319876 24013 167509 284828 77061 89903 288305 288813 31166 128375 27801 367545 132335 188403 30929...

output:

149402517

result:

ok single line: '149402517'

Test #15:

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

input:

79960
66091 79080 64312 79313 30582 43485 60573 54896 72970 16836 76908 73404 38570 41869 18829 33196 59838 65687 23664 79282 33256 75018 25696 22350 53860 12729 53042 62892 76763 8326 39230 12734 45318 50383 43253 66094 40860 49415 16001 13597 30299 25699 26472 45214 64214 13568 49864 38108 77843 5...

output:

123425531

result:

ok single line: '123425531'