QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#422354#5956. Paradox SortZhaoZiLong4 265ms3848kbC++20931b2024-05-27 12:28:362024-05-27 12:28:38

Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 4
Accepted

Test #1:

score: 4
Accepted
time: 265ms
memory: 3848kb

input:

100
3 0
-YN
N-Y
YN-
2 0
-Y
N-
5 0
-YNNN
N-YNN
YN-YN
YYN-Y
YYYN-
5 1
-NYYY
Y-NNN
NY-NY
NYY-N
NYNY-
6 5
-YYNNY
N-YYNY
NN-NYN
YNY-NY
YYNY-Y
NNYNN-
4 0
-YYY
N-YN
NN-N
NYY-
2 0
-Y
N-
5 1
-NYNY
Y-YYY
NN-YY
YNN-N
NNNY-
7 5
-YYYYYY
N-NNYYN
NY-YNNN
NYN-NYN
NNYY-NN
NNYNY-N
NYYYYY-
8 0
-YNNNNNN
N-YNNNNN
YN-YNN...

output:

Case #1: 1 2 0 
Case #2: 0 1 
Case #3: 3 4 2 1 0 
Case #4: 0 2 3 4 1 
Case #5: 0 1 3 4 2 5 
Case #6: 0 1 2 3 
Case #7: 0 1 
Case #8: 0 1 2 3 4 
Case #9: IMPOSSIBLE
Case #10: 6 7 5 4 3 2 1 0 
Case #11: 0 1 2 
Case #12: 0 1 
Case #13: 0 1 
Case #14: IMPOSSIBLE
Case #15: IMPOSSIBLE
Case #16: 7 8 6 5 4 ...

result:

ok 100 lines

Subtask #2:

score: 0
Time Limit Exceeded

Test #2:

score: 0
Time Limit Exceeded

input:

100
39 0
-YNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN
N-YNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN
YN-YNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN
YYN-YNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN
YYYN-YNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN
YYYYN-YNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN
YYYYYN-YNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN
YYYYYYN-YNN...

output:


result: