QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#835947#9926. Flipping Pathsucup-team6239#WA 1ms4716kbC++143.5kb2024-12-28 15:36:112024-12-28 15:36:17

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

input:

4
3 3
WBB
BWB
BBW
1 5
WWWWW
2 2
BB
BB
4 1
W
B
B
W

output:

YES
4
RRDD
DRDR
DRDR
DDRR
YES
0
YES
2
RD
RD
NO

result:

ok ok (4 test cases)

Test #2:

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

input:

323
1 2
BB
1 2
BW
1 2
WB
1 2
WW
2 1
B
B
2 1
B
W
2 1
W
B
2 1
W
W
1 3
BBB
1 3
BBW
1 3
BWB
1 3
BWW
1 3
WBB
1 3
WBW
1 3
WWB
1 3
WWW
2 2
BB
BB
2 2
BB
BW
2 2
BB
WB
2 2
BB
WW
2 2
BW
BB
2 2
BW
BW
2 2
BW
WB
2 2
BW
WW
2 2
WB
BB
2 2
WB
BW
2 2
WB
WB
2 2
WB
WW
2 2
WW
BB
2 2
WW
BW
2 2
WW
WB
2 2
WW
WW
3 1
B
B
B
3 ...

output:

YES
1
R
NO
NO
YES
0
YES
1
D
NO
NO
YES
0
YES
1
RR
NO
NO
NO
NO
NO
NO
YES
0
YES
2
RD
RD
NO
YES
3
RD
DR
DR
NO
YES
3
RD
RD
DR
NO
YES
2
RD
DR
NO
NO
YES
2
RD
DR
NO
YES
3
RD
RD
DR
NO
YES
3
RD
DR
DR
NO
YES
2
RD
RD
YES
1
DD
NO
NO
NO
NO
NO
NO
YES
0
YES
1
RRR
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
YES
0
YES
...

result:

ok ok (323 test cases)

Test #3:

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

input:

278
2 4
BWBW
WWBB
2 4
BWBW
WWBW
2 4
BWBW
WWWB
2 4
BWBW
WWWW
2 4
BWWB
B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O
NO
NO
YES
5
RRDD
RDRD
DRDR
DRDR
DDRR
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
YES
5
RRDD
RDDR
DRDR
DDRR
DDRR
NO
NO
NO
NO
NO
YES
5
RRDD
RDRD
DRDR
DDRR
DDRR
NO
...

result:

ok ok (333 test cases)

Test #5:

score: -100
Wrong Answer
time: 0ms
memory: 4716kb

input:

266
3 3
WWB
WWW
WWW
3 3
WWW
BBB
BBB
3 3
WWW
BBB
BBW
3 3
WWW
BBB
BWB
3 3
WWW
BBB
BWW
3 3
WWW
BBB
WBB
3 3
WWW
BBB
WBW
3 3
WWW
BBB
WWB
3 3
WWW
BBB
WWW
3 3
WWW
BBW
BBB
3 3
WWW
BBW
BBW
3 3
WWW
BBW
BWB
3 3
WWW
BBW
BWW
3 3
WWW
BBW
WBB
3 3
WWW
BBW
WBW
3 3
WWW
BBW
WWB
3 3
WWW
BBW
WWW
3 3
WWW
BWB
BBB
3 3
WWW
...

output:

NO
NO
NO
NO
YES
5
RRDD
DRRD
DRDR
DDRR
DDRR
NO
NO
NO
NO
NO
YES
5
RRDD
DRDR
DRDR
DDRR
DDRR
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
YES
5
RRDD
DRRD
DRDR
DRDR
DDRR
NO
NO
NO
NO
NO
YES
5
RRDD
DRDR
DRDR
DRDR
DDRR
NO
NO
NO
YES
4
RDRD
RDDR
DRDR
DDRR
NO
NO
NO
NO
NO
NO
NO
NO
NO
YES
4
RDRD
RDRD
DRDR
DDRR
NO
NO
N...

result:

wrong answer cell (3,2) contains different color with (1,1) after all ops. (test case 90)