QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#45512#4565. Rarest InsectsZhangYiDe0 51ms3996kbC++141.5kb2022-08-24 12:06:592022-08-24 12:07:01

Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 0
Wrong Answer

Test #1:

score: 10
Accepted
time: 3ms
memory: 3848kb

input:

6
1
1
2
1
2
2
1
2
2
1

output:

8
0 0
8
0 1
8
2
8
0 2
8
2
8
0 3
8
2
8
1 0
8
2
8
0 4
8
2
8
1 1
8
2
8
1 2
8
2
8
0 5
8
2
8
1 3
8
2
8
1 4
8
2
8
3 1

result:

ok 

Test #2:

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

input:

2
2
1

output:

8
0 0
8
0 1
8
2
8
1 0
8
2
8
3 2

result:

ok 

Test #3:

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

input:

2
1

output:

8
0 0
8
0 1
8
2
8
3 1

result:

ok 

Test #4:

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

input:

3
1
2
2
1

output:

8
0 0
8
0 1
8
2
8
0 2
8
2
8
1 0
8
2
8
1 1
8
2
8
3 1

result:

ok 

Test #5:

score: -10
Wrong Answer
time: 1ms
memory: 3764kb

input:

5
1
2
2
1
1
2
2
1

output:

8
0 0
8
0 1
8
2
8
0 2
8
2
8
1 0
8
2
8
1 1
8
2
8
0 3
8
2
8
0 4
8
2
8
1 2
8
2
8
1 3
8
2
8
3 1

result:

wrong answer Wrong answer.

Subtask #2:

score: 0
Wrong Answer

Test #24:

score: 15
Accepted
time: 51ms
memory: 3768kb

input:

1000
2
1
2
1
2
1
2
1
2
1
2
1
2
1
2
1
2
1
2
1
2
1
2
1
2
1
2
1
2
1
2
1
2
1
2
1
2
1
2
1
2
1
2
1
2
1
2
1
2
1
2
1
2
1
2
1
2
1
2
1
2
1
2
1
2
1
2
1
2
1
2
1
2
1
2
1
2
1
2
1
2
1
2
1
2
1
2
1
2
1
2
1
2
1
2
1
2
1
2
1
2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ok 

Test #26:

score: -15
Wrong Answer
time: 8ms
memory: 3920kb

input:

999
1
1
1
1
1
1
1
1
2
2
2
1
1
1
1
1
1
2
1
1
1
1
1
1
1
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
1
1
1
1
2
2
2
2
1
1
1
1
1
1
1
1
1
1
2
2
1
1
1
1
1
1
1
2
2
2
2
2
2
2
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
2
2
2
1
1
2
2
2
2
2
1
1
1
1
1
1
1
1
1
2
2
2
2
2
2
2
2
2
1
1
1
1
1
1
1
1
1
...

output:

8
0 0
8
0 1
8
2
8
0 2
8
2
8
0 3
8
2
8
0 4
8
2
8
0 5
8
2
8
0 6
8
2
8
0 7
8
2
8
0 8
8
2
8
0 9
8
2
8
1 0
8
2
8
1 1
8
2
8
1 2
8
2
8
0 10
8
2
8
0 11
8
2
8
0 12
8
2
8
0 13
8
2
8
0 14
8
2
8
0 15
8
2
8
1 3
8
2
8
0 16
8
2
8
0 17
8
2
8
0 18
8
2
8
0 19
8
2
8
0 20
8
2
8
0 21
8
2
8
0 22
8
2
8
1 4
8
2
8
1 5
8
2
8...

result:

wrong answer Wrong answer.

Subtask #3:

score: 0
Wrong Answer

Test #43:

score: 75
Accepted
time: 2ms
memory: 3844kb

input:

2
2
1

output:

8
0 0
8
0 1
8
2
8
1 0
8
2
8
3 2

result:

ok 

Test #44:

score: 75
Accepted
time: 0ms
memory: 3848kb

input:

2
1

output:

8
0 0
8
0 1
8
2
8
3 1

result:

ok 

Test #45:

score: 75
Accepted
time: 0ms
memory: 3840kb

input:

3
1
2
2
1

output:

8
0 0
8
0 1
8
2
8
0 2
8
2
8
1 0
8
2
8
1 1
8
2
8
3 1

result:

ok 

Test #46:

score: 75
Accepted
time: 1ms
memory: 3812kb

input:

6
2
1
1
2
1
2
2
1
2
1

output:

8
0 0
8
0 1
8
2
8
1 0
8
2
8
0 2
8
2
8
0 3
8
2
8
1 1
8
2
8
0 4
8
2
8
1 2
8
2
8
1 3
8
2
8
0 5
8
2
8
1 4
8
2
8
3 1

result:

ok 

Test #47:

score: 0
Wrong Answer
time: 4ms
memory: 3816kb

input:

10
1
2
2
1
2
1
1
2
2
1
2
1
1
2
1
2
2
1

output:

8
0 0
8
0 1
8
2
8
0 2
8
2
8
1 0
8
2
8
1 1
8
2
8
0 3
8
2
8
1 2
8
2
8
0 4
8
2
8
0 5
8
2
8
1 3
8
2
8
1 4
8
2
8
0 6
8
2
8
1 5
8
2
8
0 7
8
2
8
0 8
8
2
8
1 6
8
2
8
0 9
8
2
8
1 7
8
2
8
1 8
8
2
8
3 1

result:

wrong answer Wrong answer.