QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#865990#9327. Permutation and Queriesucup-team4744#RE 5ms3712kbC++232.1kb2025-01-22 10:18:562025-01-22 10:18:57

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 1ms
memory: 3584kb

input:

6 5
2 4 1 6 3 5
1 2
3 5
1 2
5 3
5 6

output:

2
1
1
1
2
1

result:

ok 6 numbers

Test #2:

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

input:

10 20
1 4 7 10 2 5 8 3 6 9
10 1
5 7
1 2
5 3
6 3
9 4
3 4
9 6
8 4
9 6
8 7
3 8
10 7
2 7
3 7
5 9
7 6
4 6
2 10
8 9

output:

3
3
1
1
1
1
1
1
1
2
1
1
1
1
1
1
1
1
1
1
1

result:

ok 21 numbers

Test #3:

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

input:

5 6
1 3 5 2 4
2 4
1 3
2 4
1 4
2 3
4 2

output:

2
1
1
1
1
1
2

result:

ok 7 numbers

Test #4:

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

input:

4 4
1 3 2 4
1 2
3 1
1 3
2 3

output:

1
1
1
1
1

result:

ok 5 number(s): "1 1 1 1 1"

Test #5:

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

input:

3 5
1 2 3
1 3
2 1
3 2
2 1
2 1

output:

1
1
1
1
1
1

result:

ok 6 numbers

Test #6:

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

input:

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

output:

10
10
10
3
3
2
2
2
2
2
2
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
2
2
2
2
2
2
2
1
1
1
1
1
1
1
1
1
1
1
1
2
2
2
2
2
2
2
2
2
2
2
2
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
2
2
2
2
2
2
2
2
2...

result:

ok 1001 numbers

Test #7:

score: -100
Runtime Error

input:

1000 1000
1 32 63 94 125 156 187 218 249 280 311 342 373 404 435 466 497 528 559 590 621 652 683 714 745 776 807 838 869 900 931 962 993 2 33 64 95 126 157 188 219 250 281 312 343 374 405 436 467 498 529 560 591 622 653 684 715 746 777 808 839 870 901 932 963 994 3 34 65 96 127 158 189 220 251 282 3...

output:


result: