QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#376999#6109. Similarity GraphdsostRE 1ms3720kbC++201.5kb2024-04-04 20:08:362024-04-04 20:08:36

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

input:

4
0 1 0 1
1 0 0 0
0 0 0 1
1 0 1 0

output:

YES
1 2 3 4
2 4 1 3

result:

ok ok

Test #2:

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

input:

6
0 1 0 1 0 1
1 0 0 0 1 0
0 0 0 1 1 1
1 0 1 0 0 0
0 1 1 0 0 0
1 0 1 0 0 0

output:

NO

result:

ok ok

Test #3:

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

input:

1
0

output:

YES
1
1

result:

ok ok

Test #4:

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

input:

2
0 0
0 0

output:

YES
1 2
2 1

result:

ok ok

Test #5:

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

input:

2
0 1
1 0

output:

YES
1 2
1 2

result:

ok ok

Test #6:

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

input:

3
0 0 0
0 0 0
0 0 0

output:

YES
1 2 3
3 2 1

result:

ok ok

Test #7:

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

input:

3
0 0 0
0 0 1
0 1 0

output:

YES
1 2 3
3 1 2

result:

ok ok

Test #8:

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

input:

3
0 0 1
0 0 0
1 0 0

output:

YES
2 1 3
1 3 2

result:

ok ok

Test #9:

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

input:

3
0 0 1
0 0 1
1 1 0

output:

YES
1 2 3
2 1 3

result:

ok ok

Test #10:

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

input:

3
0 1 0
1 0 0
0 0 0

output:

YES
1 2 3
2 3 1

result:

ok ok

Test #11:

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

input:

3
0 1 0
1 0 1
0 1 0

output:

YES
2 1 3
3 1 2

result:

ok ok

Test #12:

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

input:

3
0 1 1
1 0 0
1 0 0

output:

YES
1 2 3
1 3 2

result:

ok ok

Test #13:

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

input:

3
0 1 1
1 0 1
1 1 0

output:

YES
1 2 3
1 2 3

result:

ok ok

Test #14:

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

input:

4
0 0 1 0
0 0 1 0
1 1 0 0
0 0 0 0

output:

YES
1 2 3 4
3 2 4 1

result:

ok ok

Test #15:

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

input:

4
0 1 1 1
1 0 0 0
1 0 0 0
1 0 0 0

output:

YES
1 2 3 4
1 4 3 2

result:

ok ok

Test #16:

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

input:

4
0 1 0 1
1 0 1 0
0 1 0 0
1 0 0 0

output:

YES
4 1 2 3
3 2 4 1

result:

ok ok

Test #17:

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

input:

4
0 1 0 0
1 0 0 0
0 0 0 1
0 0 1 0

output:

YES
1 2 3 4
3 4 1 2

result:

ok ok

Test #18:

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

input:

4
0 0 0 0
0 0 0 0
0 0 0 1
0 0 1 0

output:

YES
1 2 3 4
4 3 1 2

result:

ok ok

Test #19:

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

input:

5
0 0 1 0 1
0 0 1 1 1
1 1 0 1 1
0 1 1 0 0
1 1 1 0 0

output:

YES
4 2 1 3 5
2 3 1 5 4

result:

ok ok

Test #20:

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

input:

5
0 0 1 0 1
0 0 1 0 1
1 1 0 0 0
0 0 0 0 1
1 1 0 1 0

output:

YES
1 2 3 4 5
3 2 5 1 4

result:

ok ok

Test #21:

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

input:

5
0 1 0 1 0
1 0 1 0 1
0 1 0 1 1
1 0 1 0 0
0 1 1 0 0

output:

YES
1 5 2 3 4
3 4 1 5 2

result:

ok ok

Test #22:

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

input:

5
0 1 0 1 0
1 0 1 1 1
0 1 0 1 0
1 1 1 0 1
0 1 0 1 0

output:

YES
3 1 4 2 5
5 1 4 2 3

result:

ok ok

Test #23:

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

input:

5
0 1 0 0 1
1 0 1 1 0
0 1 0 0 0
0 1 0 0 0
1 0 0 0 0

output:

YES
5 1 2 3 4
3 2 5 4 1

result:

ok ok

Test #24:

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

input:

6
0 0 1 0 0 1
0 0 0 1 1 1
1 0 0 1 1 0
0 1 1 0 1 1
0 1 1 1 0 1
1 1 0 1 1 0

output:

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

result:

ok ok

Test #25:

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

input:

6
0 0 1 0 1 0
0 0 0 1 1 1
1 0 0 0 1 0
0 1 0 0 0 0
1 1 1 0 0 1
0 1 0 0 1 0

output:

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

result:

ok ok

Test #26:

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

input:

6
0 0 1 0 1 1
0 0 1 1 0 0
1 1 0 1 0 0
0 1 1 0 1 1
1 0 0 1 0 0
1 0 0 1 0 0

output:

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

result:

ok ok

Test #27:

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

input:

6
0 1 0 1 0 0
1 0 0 0 0 0
0 0 0 0 0 1
1 0 0 0 1 1
0 0 0 1 0 0
0 0 1 1 0 0

output:

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

result:

ok ok

Test #28:

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

input:

6
0 0 0 0 0 1
0 0 1 0 1 1
0 1 0 0 1 1
0 0 0 0 1 1
0 1 1 1 0 0
1 1 1 1 0 0

output:

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

result:

ok ok

Test #29:

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

input:

7
0 1 0 1 1 0 1
1 0 1 0 1 1 1
0 1 0 0 0 0 0
1 0 0 0 0 0 0
1 1 0 0 0 0 1
0 1 0 0 0 0 1
1 1 0 0 1 1 0

output:

YES
1 7 6 2 3 4 5
3 6 1 7 4 2 5

result:

ok ok

Test #30:

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

input:

7
0 0 1 0 0 1 0
0 0 1 0 1 1 0
1 1 0 0 0 1 1
0 0 0 0 0 1 0
0 1 0 0 0 1 0
1 1 1 1 1 0 1
0 0 1 0 0 1 0

output:

YES
6 5 4 2 3 1 7
4 6 2 7 5 1 3

result:

ok ok

Test #31:

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

input:

7
0 0 1 0 0 0 1
0 0 0 1 0 1 0
1 0 0 0 0 0 1
0 1 0 0 0 0 1
0 0 0 0 0 1 1
0 1 0 0 1 0 0
1 0 1 1 1 0 0

output:

NO

result:

ok ok

Test #32:

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

input:

7
0 1 1 0 1 0 1
1 0 0 1 0 1 1
1 0 0 0 0 1 0
0 1 0 0 0 1 0
1 0 0 0 0 1 0
0 1 1 1 1 0 0
1 1 0 0 0 0 0

output:

NO

result:

ok ok

Test #33:

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

input:

7
0 1 0 1 1 1 0
1 0 0 0 0 0 0
0 0 0 1 0 1 0
1 0 1 0 1 1 1
1 0 0 1 0 0 0
1 0 1 1 0 0 1
0 0 0 1 0 1 0

output:

YES
5 1 6 2 3 4 7
7 6 4 1 5 2 3

result:

ok ok

Test #34:

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

input:

8
0 0 0 0 0 0 0 0
0 0 1 1 1 0 1 0
0 1 0 1 0 1 1 1
0 1 1 0 1 1 1 0
0 1 0 1 0 1 0 1
0 0 1 1 1 0 1 0
0 1 1 1 0 1 0 1
0 0 1 0 1 0 1 0

output:

YES
1 6 3 5 2 7 4 8
8 7 1 5 3 6 2 4

result:

ok ok

Test #35:

score: -100
Runtime Error

input:

12
0 1 0 1 0 0 1 1 0 1 0 0
1 0 0 0 1 0 1 1 1 0 1 1
0 0 0 0 1 1 1 1 0 1 0 0
1 0 0 0 1 0 1 1 1 0 0 0
0 1 1 1 0 1 0 0 0 1 0 0
0 0 1 0 1 0 1 1 0 1 0 0
1 1 1 1 0 1 0 0 0 1 0 0
1 1 1 1 0 1 0 0 0 1 1 0
0 1 0 1 0 0 0 0 0 0 1 1
1 0 1 0 1 1 1 1 0 0 0 0
0 1 0 0 0 0 0 1 1 0 0 0
0 1 0 0 0 0 0 0 1 0 0 0

output:


result: