QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#51786#4861. Lexicographic ComparisonlarryzhongTL 200ms4012kbC++20842b2022-10-04 02:23:312022-10-04 02:23:33

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

input:

2
5 5
cmp 1 2
swap_p 1 2
cmp 1 2
swap_a 1 2
cmp 1 2
1 1
swap_a 1 1

output:

=
<
>

result:

ok 3 lines

Test #2:

score: 0
Accepted
time: 27ms
memory: 3636kb

input:

10000
5 3
swap_p 2 2
cmp 8 9
swap_a 4 2
19 1
swap_p 7 1
6 12
cmp 5 10
swap_p 3 4
cmp 3 4
swap_p 2 2
cmp 9 3
swap_p 5 2
swap_a 3 3
cmp 5 7
swap_a 1 2
cmp 7 2
swap_a 5 4
cmp 9 2
2 8
swap_p 2 1
swap_p 1 1
cmp 4 7
cmp 3 6
swap_p 2 1
swap_p 1 1
swap_a 2 2
cmp 7 1
70 6
cmp 9 5
swap_p 53 63
swap_p 53 31
sw...

output:

=
=
<
=
=
<
<
>
<
=
=
>
=
=
=
=
=
=
=
=
=
=
>
<
=
<
=
>
=
=
=
>
=
>
>
=
=
=
=
=
=
=
=
>
<
=
=
=
>
<
=
<
=
=
=
<
=
<
>
=
=
=
=
>
>
>
>
=
=
=
=
=
=
=
=
=
<
=
>
>
>
=
=
=
=
=
=
=
=
=
<
=
<
=
<
=
=
=
>
>
<
=
=
=
=
>
<
=
=
=
=
=
=
=
=
=
<
>
<
>
=
=
=
=
=
>
<
<
<
>
=
<
=
>
=
<
=
=
=
=
=
=
<
<
>
>
<
=
=
=
...

result:

ok 33282 lines

Test #3:

score: 0
Accepted
time: 30ms
memory: 3744kb

input:

10000
2 15
swap_a 2 2
swap_p 2 2
cmp 326694868363016462 925456129016738104
swap_p 1 2
swap_a 2 2
swap_p 2 1
swap_p 2 1
swap_a 2 2
cmp 194403870824900634 290296733170168261
cmp 685622533532390613 845098181059391203
swap_p 2 2
swap_p 2 2
swap_p 2 2
swap_p 1 1
swap_a 2 1
31 3
swap_a 5 30
swap_a 15 1
cm...

output:

=
>
=
=
=
=
<
=
=
<
<
<
>
=
>
=
>
=
=
=
=
=
<
<
>
<
=
=
<
<
<
>
=
=
=
=
=
=
=
<
=
=
=
<
=
>
=
=
=
=
<
=
=
=
=
=
=
>
<
=
=
=
=
=
=
=
<
=
<
=
<
=
>
>
=
=
=
=
=
=
=
<
<
>
>
=
=
=
<
=
=
=
<
>
<
=
=
=
=
>
>
=
>
=
=
=
=
>
=
=
>
<
<
=
=
=
=
=
<
=
=
=
>
>
>
>
=
>
=
=
>
=
=
=
=
=
=
=
=
=
<
<
>
<
>
=
=
>
=
<
...

result:

ok 33428 lines

Test #4:

score: 0
Accepted
time: 36ms
memory: 3628kb

input:

1000
65 43
swap_a 42 31
swap_a 56 25
cmp 13794376267158472 46277656098109759
cmp 444036536304978262 755847352552132493
cmp 908256097321476449 595621612325961509
cmp 635480759573261863 559355393434597718
swap_a 27 57
cmp 585086370256076627 733151313507052357
swap_a 43 62
swap_p 64 50
swap_p 40 16
swa...

output:

=
=
=
=
=
<
<
<
<
>
>
<
=
<
>
>
<
<
>
>
>
=
<
=
<
>
>
<
<
<
>
>
<
>
>
>
<
<
<
>
<
<
<
>
<
>
<
<
>
>
>
<
>
>
>
>
<
<
<
<
>
>
<
=
=
=
=
=
=
=
=
>
=
=
=
>
=
=
<
>
<
<
<
>
<
<
=
=
=
=
<
=
=
=
>
>
>
>
>
>
=
=
=
>
=
=
<
>
=
<
<
>
<
=
<
>
>
<
>
<
>
>
<
>
<
<
<
<
>
<
<
<
>
>
>
>
>
>
>
>
<
<
>
=
=
=
=
>
<
>
...

result:

ok 33319 lines

Test #5:

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

input:

100
879 867
swap_p 111 344
cmp 361083772874837023 709151040161323902
swap_a 99 180
cmp 641913877862669667 450742900066998679
cmp 39483451443775826 957145697637778063
swap_a 237 178
swap_a 31 326
swap_p 291 662
swap_a 84 703
swap_a 541 37
swap_a 57 615
swap_a 332 609
swap_p 74 439
swap_a 281 350
swap...

output:

<
=
>
<
=
>
=
<
>
=
=
<
=
=
>
<
=
=
=
>
>
>
<
<
>
<
=
>
<
>
>
>
>
>
<
>
>
<
<
<
<
<
<
>
=
<
<
>
>
<
>
<
>
>
<
>
<
<
>
>
>
=
<
=
>
<
<
=
<
<
<
>
<
>
>
<
>
>
<
>
<
<
>
>
<
>
>
>
>
<
>
>
<
<
<
<
>
<
>
<
<
<
<
<
>
>
>
>
>
>
>
>
<
>
<
<
<
>
>
<
<
>
>
>
>
>
>
<
<
>
>
>
<
>
<
<
>
<
>
>
>
<
<
<
>
>
<
>
>
<
...

result:

ok 33308 lines

Test #6:

score: 0
Accepted
time: 119ms
memory: 3768kb

input:

10
2397 3950
swap_a 643 401
cmp 515978739075589733 566064461406691441
swap_p 108 1740
cmp 645610656342389227 935405231824412954
swap_p 1949 972
swap_a 350 395
cmp 584097429036799031 466605450371139077
cmp 188110274758711055 52954946610635907
cmp 898925291698145288 529496510940857315
cmp 369035636621...

output:

=
<
=
=
>
=
>
<
<
<
>
=
<
>
=
=
<
<
<
<
=
<
>
<
<
<
>
>
<
<
<
<
=
>
<
>
<
>
>
<
>
<
>
<
<
<
=
>
<
>
=
<
>
<
<
<
=
>
>
>
>
>
<
>
>
<
<
<
=
<
<
<
>
>
<
>
=
<
<
<
<
=
=
=
>
<
>
<
=
<
>
>
>
=
>
<
<
<
=
>
=
>
>
>
<
>
>
=
<
>
>
<
>
=
<
>
=
>
>
<
>
>
=
<
>
>
<
<
=
>
>
<
>
>
<
>
>
>
<
=
>
<
<
<
=
<
>
<
<
>
...

result:

ok 33547 lines

Test #7:

score: 0
Accepted
time: 200ms
memory: 3960kb

input:

1
100000 100000
cmp 275296188064989117 800031045635430494
swap_p 387 71136
cmp 795078469543095339 86592103476177255
swap_p 49521 71789
swap_p 79546 16901
swap_a 92586 88319
cmp 165520908415920510 83593495696513240
cmp 397367134248646770 481876428149248833
swap_a 13927 77270
swap_a 47748 40395
cmp 23...

output:

=
=
=
>
=
>
=
>
=
<
<
=
=
=
=
=
>
=
=
<
=
<
>
=
=
=
<
=
=
>
=
=
<
=
=
<
<
=
<
<
=
<
>
>
=
=
=
=
<
=
=
=
<
>
=
<
<
>
<
=
<
>
<
>
=
=
<
<
=
=
=
=
=
=
<
=
>
>
<
=
=
=
=
=
>
<
>
<
<
<
>
=
=
<
=
=
<
>
<
>
>
<
=
<
<
>
>
>
<
>
<
=
>
=
>
<
<
>
<
=
>
<
<
<
<
>
>
>
<
<
<
>
<
>
>
>
=
>
<
=
<
<
>
>
<
>
>
>
>
>
...

result:

ok 33339 lines

Test #8:

score: 0
Accepted
time: 192ms
memory: 3880kb

input:

1
100000 100000
cmp 711525147933505257 539965757374435240
cmp 772631397936820308 681918367983678100
swap_p 32225 37695
cmp 908390687737274785 813678038049709833
cmp 937904202854552410 12308320153007147
swap_a 4841 25610
cmp 917660754232600606 924722230106760619
swap_a 43334 13111
swap_a 14653 89397
...

output:

=
=
=
>
>
=
=
=
=
>
=
=
<
=
=
>
=
<
<
>
<
=
>
>
>
=
=
<
=
<
=
<
=
>
=
<
=
>
<
<
=
>
=
>
<
=
=
<
=
=
>
>
>
=
=
>
>
>
=
=
=
<
<
=
=
>
=
>
=
<
<
>
=
=
=
=
>
=
<
<
<
=
>
=
>
=
=
=
=
=
>
<
=
=
>
<
<
=
=
>
=
=
=
<
<
>
=
<
<
>
>
=
<
>
<
<
<
<
>
<
<
<
>
<
>
<
>
<
>
=
<
<
>
<
<
<
>
=
>
>
<
>
=
<
>
<
>
>
=
<
...

result:

ok 33018 lines

Test #9:

score: 0
Accepted
time: 162ms
memory: 3876kb

input:

1
100000 100000
swap_a 47080 69562
cmp 762845072453568546 81871312173171816
swap_p 50683 36267
swap_a 1106 8448
swap_p 33023 74990
swap_p 20793 57647
swap_a 76519 58086
swap_p 4716 55099
swap_a 80469 59619
swap_a 90650 70560
cmp 349858792087292474 769398732484415241
swap_a 7191 80796
swap_a 73779 68...

output:

=
>
=
>
=
<
=
=
>
<
=
<
=
>
=
>
>
>
=
>
=
<
<
=
<
>
>
<
=
>
=
=
<
=
<
=
=
<
>
<
<
<
=
=
>
=
<
=
=
>
>
<
>
<
<
<
>
=
>
=
>
>
>
>
=
=
=
=
=
>
=
>
<
=
=
<
=
=
=
=
=
<
<
>
<
<
=
<
=
<
>
<
>
>
>
>
>
<
<
<
<
<
>
>
=
<
<
>
>
=
<
>
=
<
<
<
=
<
<
<
<
=
<
<
=
<
=
<
=
<
>
=
>
>
=
<
>
<
<
<
<
<
=
>
>
=
>
>
>
<
...

result:

ok 33392 lines

Test #10:

score: 0
Accepted
time: 153ms
memory: 3952kb

input:

1
100000 100000
cmp 583983059080602946 243207209117285947
cmp 943450775895518815 492498714512827142
cmp 496703023811323100 155542152882112147
swap_p 83477 5804
cmp 292296110154672437 213693414719502592
swap_a 65042 53869
cmp 791788720971316669 53728981001645229
swap_p 15063 80147
cmp 827461442511953...

output:

=
=
=
<
=
=
<
=
=
<
<
<
=
=
=
=
>
=
<
=
<
=
=
<
<
>
>
=
=
<
>
<
=
=
>
>
=
=
=
<
<
<
=
<
=
>
<
<
=
=
=
=
=
=
=
=
=
=
<
=
=
>
=
>
>
=
>
<
=
=
>
>
<
=
<
>
=
<
=
>
=
=
<
<
=
<
>
<
<
=
=
<
<
<
<
=
>
<
=
=
=
<
=
>
=
=
=
=
=
>
<
=
>
<
>
=
<
=
=
=
=
=
=
>
>
=
<
=
<
>
=
>
>
=
=
=
<
=
>
<
<
=
>
<
=
>
>
=
<
>
...

result:

ok 33481 lines

Test #11:

score: 0
Accepted
time: 195ms
memory: 4012kb

input:

1
100000 100000
swap_a 30227 43877
swap_p 46302 44772
swap_a 64941 79197
cmp 91013920853007211 964613016882996222
cmp 258377755420086237 61743627329152983
swap_a 91790 41931
cmp 297004985803970515 262531377925362079
cmp 560237748477773595 786407574131206764
swap_a 19973 42446
swap_a 63085 6414
swap_...

output:

<
=
=
<
<
>
<
<
=
=
=
=
<
>
>
=
<
<
<
=
=
=
=
=
=
=
<
=
=
<
<
<
<
>
=
=
>
>
<
=
>
>
<
<
>
=
=
=
=
>
>
>
=
=
=
<
<
<
=
=
=
=
=
>
=
>
<
<
=
=
=
>
=
>
>
<
=
>
=
=
>
=
>
=
=
>
=
>
=
<
=
>
=
<
=
=
=
>
>
=
>
=
=
=
=
<
=
=
<
>
<
=
=
>
=
<
=
=
<
=
<
=
=
=
>
=
>
>
<
=
>
=
>
>
<
<
>
=
=
>
<
<
>
=
<
<
<
=
<
>
...

result:

ok 33642 lines

Test #12:

score: -100
Time Limit Exceeded

input:

1
100000 100000
swap_a 88322 88321
swap_p 59728 59727
cmp 970709134002514987 378535920005436396
swap_a 16103 16104
swap_p 26234 26233
swap_a 7304 7303
cmp 199519809604421701 453382810567022576
swap_a 76013 76014
swap_a 51979 51980
swap_p 39573 39574
swap_a 92697 92698
cmp 731583826302382596 60589963...

output:

<
<
>
=
=
<
=
<
<
=
<
=
=
<
<
=
=
<
=
=
=
=
<
>
>
=
>
=
>
>
=
=
=
>
<
<
=
=
>
=
>
>
<
=
>
=
=
>
=
=
>
>
=
<
>
>
=
=
>
>
=
<
=
=
=
>
=
=
=
<
=
=
<
>
>
<
>
=
=
=
=
=
=
>
=
<
>
>
=
<
<
<
=
<
=
=
<
=
<
=
>
=
=
=
<
>
=
>
<
>
>
=
=
=
=
=
>
=
=
=
<
>
=
=
>
<
>
=
>
=
<
>
<
=
=
>
=
>
>
<
=
>
<
=
=
<
=
=
=
=
...

result: