QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#76411#5466. Permutation CompressionguowenzzRE 329ms13528kbC++174.9kb2023-02-09 20:26:272023-02-09 20:26:29

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

input:

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

output:

YES
YES
NO

result:

ok 3 lines

Test #2:

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

input:

100
2 1 2
2 1
2
1 1
2 1 2
1 2
1
2 2
2 1 1
1 2
1
2
6 1 5
3 4 2 5 6 1
3
5 2 1 1 1
6 1 6
2 1 3 6 4 5
1
4 1 2 2 1 4
3 3 2
2 1 3
2 1 3
2 2
1 1 1
1
1
1
1 1 1
1
1
1
2 1 2
2 1
2
1 2
4 4 3
2 1 3 4
2 1 3 4
4 3 1
1 1 1
1
1
1
6 5 1
6 2 5 4 3 1
6 2 4 3 1
4
1 1 1
1
1
1
6 5 3
3 6 1 4 5 2
3 6 1 4 2
3 3 4
4 3 4
3 4 ...

output:

YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
NO
YES
YES
YES
YES
NO
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
NO
NO
NO
YES
YES
NO
NO
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
NO
YES
YES
YES
YES
YES
YES
NO
YES
YES
YES
YES
YES
YES
YES
NO
YES
YES
YES
YES
YE...

result:

ok 100 lines

Test #3:

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

input:

99
6 1 6
1 5 3 4 2 6
1
1 2 1 1 1 6
1 1 1
1
1
1
4 1 3
3 4 1 2
1
1 1 2
2 2 1
2 1
2 1
2
1 1 1
1
1
1
2 1 2
1 2
2
1 2
1 1 1
1
1
1
1 1 1
1
1
1
3 2 2
3 2 1
2 1
1 2
3 3 1
2 3 1
2 3 1
1
6 1 5
3 4 2 5 6 1
3
4 2 1 1 1
6 4 4
1 6 5 2 3 4
1 2 3 4
5 4 4 6
2 1 1
1 2
1
1
6 5 1
2 1 4 5 6 3
2 1 4 6 3
2
6 3 6
5 6 2 1 3...

output:

YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
NO
NO
YES
YES
YES
YES
YES
YES
YES
YES
YES
NO
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
NO
YES
YES
YES
YES
YES
YES
YES
NO
NO
YES
YES
YES
NO
YES
YES
YES
NO
YES
YES
NO
YES
NO
YES
NO
YES
YES
YES
YES
YES
YES
NO
YES
NO
NO
YES
YES
YES
YE...

result:

ok 99 lines

Test #4:

score: 0
Accepted
time: 4ms
memory: 7504kb

input:

98
6 1 6
6 1 4 5 2 3
3
1 2 2 1 1 6
4 3 2
2 3 4 1
2 1 3
3 4
1 1 1
1
1
1
6 1 6
6 4 3 1 2 5
1
3 1 3 1 1 5
1 1 1
1
1
1
6 4 4
3 4 1 2 5 6
3 4 1 2
2 4 3 1
6 5 1
4 5 3 6 1 2
4 5 3 1 2
6
1 1 1
1
1
1
5 1 4
1 3 2 4 5
1
5 3 4 4
6 3 4
1 4 2 3 6 5
1 2 5
5 4 6 5
4 1 3
2 1 4 3
2
1 1 1
1 1 1
1
1
1
6 3 5
5 1 3 6 4 2...

output:

YES
NO
YES
YES
YES
YES
YES
YES
NO
NO
YES
YES
NO
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
NO
YES
YES
YES
NO
YES
YES
YES
NO
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
NO
YES
YES
YES
YES
NO
YES
YES
YES
YES
YES
NO
YES
NO
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
NO
YES
NO
Y...

result:

ok 98 lines

Test #5:

score: 0
Accepted
time: 329ms
memory: 12648kb

input:

60000
1 1 1
1
1
1
1 1 1
1
1
1
3 2 1
2 3 1
2 1
2
3 3 1
1 2 3
1 2 3
1
1 1 1
1
1
1
1 1 1
1
1
1
1 1 1
1
1
1
3 3 2
3 2 1
3 2 1
1 1
2 2 1
2 1
2 1
1
1 1 1
1
1
1
2 2 1
1 2
1 2
1
1 1 1
1
1
1
3 1 3
2 3 1
1
2 3 2
3 3 2
2 3 1
2 3 1
2 1
1 1 1
1
1
1
1 1 1
1
1
1
1 1 1
1
1
1
3 2 3
3 2 1
2 1
1 2 1
3 2 2
1 3 2
3 2
3 ...

output:

YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
NO
YES
YES
YES
YES
YES
YES
NO
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
NO
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES...

result:

ok 60000 lines

Test #6:

score: 0
Accepted
time: 328ms
memory: 12648kb

input:

50000
1 1 1
1
1
1
4 3 4
1 2 3 4
1 2 3
2 3 4 4
1 1 1
1
1
1
3 2 1
3 1 2
1 2
3
4 1 4
2 1 4 3
2
4 4 3 4
3 1 2
1 2 3
2
3 3
4 1 3
4 2 1 3
1
3 2 4
4 4 2
4 1 2 3
4 1 2 3
3 4
3 1 2
2 1 3
3
1 3
4 2 2
4 3 1 2
3 1
2 1
1 1 1
1
1
1
4 3 1
1 2 3 4
1 2 4
4
4 1 4
4 3 2 1
4
2 1 1 2
3 3 1
2 1 3
2 1 3
1
4 3 2
1 3 2 4
1 ...

output:

YES
YES
YES
YES
NO
NO
YES
YES
NO
YES
YES
NO
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
NO
YES
NO
YES
YES
YES
YES
YES
YES
YES
YES
NO
YES
YES
YES
YES
YES
YES
NO
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
NO
YES
YES
YES
Y...

result:

ok 50000 lines

Test #7:

score: 0
Accepted
time: 196ms
memory: 13488kb

input:

40000
3 2 1
3 2 1
2 1
3
5 5 1
5 2 1 3 4
5 2 1 3 4
5
4 1 3
1 4 3 2
1
1 1 1
5 3 3
5 3 4 1 2
3 1 2
1 2 1
3 1 2
1 3 2
1
3 1
2 2 2
1 2
1 2
2 2
5 4 2
5 4 2 1 3
4 2 1 3
1 2
1 1 1
1
1
1
3 1 2
1 2 3
1
2 1
2 1 1
1 2
1
2
5 5 2
5 2 3 1 4
5 2 3 1 4
1 1
5 3 4
4 5 1 2 3
4 2 3
1 1 1 3
1 1 1
1
1
1
5 4 2
2 1 4 5 3
2 ...

output:

YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
NO
YES
NO
YES
YES
YES
YES
YES
YES
YES
NO
NO
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
NO
YES
NO
YES
YES
YES
YES
YES
YES
YES
YES
YES
NO
YES
YES
YES
NO
YES
NO
YES
YES
NO
YES
YES
YES
YES
YES
NO
NO
YES
YES
YES
YES
...

result:

ok 40000 lines

Test #8:

score: 0
Accepted
time: 254ms
memory: 12504kb

input:

40000
6 3 5
3 6 2 5 1 4
3 2 1
1 2 3 6 1
4 3 1
1 3 4 2
1 3 2
1
1 1 1
1
1
1
1 1 1
1
1
1
6 2 6
4 1 3 2 6 5
2 5
6 5 5 3 5 5
6 6 2
3 6 2 5 1 4
3 6 2 5 1 4
6 4
2 2 1
1 2
1 2
2
2 2 1
1 2
1 2
1
3 3 3
2 1 3
2 1 3
2 3 1
6 4 5
5 1 3 4 6 2
5 1 3 2
5 5 4 3 4
6 2 4
4 3 5 6 2 1
4 3
2 2 1 1
3 1 2
2 3 1
1
2 2
3 3 1
...

output:

YES
YES
YES
YES
NO
YES
YES
YES
YES
YES
YES
YES
YES
YES
NO
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
NO
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
NO
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
NO
YES
YES
YES
NO
YES
YES
YES
YES
YES
YES
YES
YES
YE...

result:

ok 40000 lines

Test #9:

score: 0
Accepted
time: 251ms
memory: 13528kb

input:

40000
7 5 2
6 4 2 1 3 5 7
6 4 2 1 3
3 1
2 2 2
2 1
2 1
1 1
4 1 4
3 4 2 1
1
3 4 2 1
3 2 2
1 3 2
1 2
1 3
5 2 4
4 3 2 5 1
2 1
2 2 2 5
7 1 7
2 7 5 6 1 4 3
3
3 3 1 1 3 1 6
7 7 2
3 7 2 5 1 6 4
3 7 2 5 1 6 4
5 6
6 2 6
2 6 3 4 1 5
2 1
6 3 4 5 3 5
3 1 3
3 1 2
1
2 3 3
7 5 3
1 7 5 4 6 3 2
5 4 6 3 2
6 1 1
6 3 5
...

output:

YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
NO
NO
YES
YES
NO
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
NO
YES
YES
YES
YES
YES
YES
NO
YES
YES
NO
YES
YES
YES
YES
YES
YES
YES
NO
YES
YES
YES
NO
YES
YES
YES
YES
YES
YES
YES
YES
NO
YES
YES
YES
YES
YES
NO
YES
YES
NO
YES
YES
NO
YES
YES
...

result:

ok 40000 lines

Test #10:

score: 0
Accepted
time: 278ms
memory: 13496kb

input:

40000
4 2 4
4 1 3 2
4 2
3 4 4 3
6 3 5
6 2 4 5 1 3
2 1 3
1 1 2 6 1
8 5 6
1 7 2 8 6 5 3 4
1 7 5 2 3
3 1 2 8 7 8
6 6 1
3 4 6 1 5 2
3 4 6 1 5 2
6
8 7 2
6 8 5 7 1 3 2 4
6 5 7 1 3 2 4
8 7
1 1 1
1
1
1
4 3 3
2 4 3 1
2 4 3
1 2 4
4 3 3
1 3 4 2
1 3 2
4 4 3
2 2 1
1 2
1 2
2
7 5 3
5 2 3 7 1 6 4
2 3 1 6 4
7 5 6
7 ...

output:

NO
YES
NO
YES
YES
YES
YES
YES
YES
NO
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
NO
YES
YES
YES
YES
YES
YES
YES
YES
YES
NO
YES
NO
YES
YES
YES
YES
YES
YES
YES
NO
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
NO
YES
YES
YES
YES
NO
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
NO
YES
NO...

result:

ok 40000 lines

Test #11:

score: -100
Runtime Error

input:

40000
2 2 2
1 2
1 2
1 1
8 2 6
1 3 5 4 6 7 2 8
3 2
2 8 6 8 7 8
8 5 4
3 1 2 7 8 5 4 6
3 1 2 5 4
8 7 7 7
1 1 1
1
1
1
1 1 1
1
1
1
2 1 1
1 2
2
2
2 2 2
1 2
2 1
2 2
2 2 2
2 1
2 1
2 1
8 1 7
5 3 8 4 1 7 6 2
2
3 5 2 1 1 1 1
9 8 2
7 8 1 6 4 5 9 3 2
7 8 1 6 4 5 3 2
2 9
2 1 2
2 1
2
1 1
4 1 4
3 1 4 2
3
1 2 1 2
3 ...

output:

YES
NO
NO
YES
YES
NO
NO
YES
YES
YES
YES
YES
YES
YES
YES
NO
YES
NO
YES
YES
YES
YES
NO
YES
YES
YES
NO
YES
NO
NO
NO
YES
YES
NO
YES
YES
YES
YES
NO
YES
NO
YES
YES
YES
YES
YES
YES
YES
YES
YES
NO
YES
NO
YES
YES
YES
YES
YES
YES
YES
YES
NO
YES
YES
YES
NO
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
NO
YES
YES...

result: