QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#45905#4565. Rarest InsectsMaMengQi0 62ms3996kbC++171.8kb2022-08-24 16:35:452022-08-24 16:35:45

Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 0
Wrong Answer

Test #1:

score: 10
Accepted
time: 4ms
memory: 3856kb

input:

6
1
2
1
2
1
2
3
1
2
2
3
1
1

output:

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

result:

ok 

Test #2:

score: 0
Accepted
time: 2ms
memory: 3876kb

input:

2
1
2
2
2

output:

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

result:

ok 

Test #3:

score: 0
Accepted
time: 2ms
memory: 3868kb

input:

2
1
1
1
1

output:

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

result:

ok 

Test #4:

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

input:

3
1
2
1
2
1
2

output:

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

result:

ok 

Test #5:

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

input:

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

output:

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

result:

wrong answer Wrong answer.

Subtask #2:

score: 0
Wrong Answer

Test #24:

score: 15
Accepted
time: 14ms
memory: 3812kb

input:

1000
1
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2...

output:

8
0 999
8
2
8
0 998
8
2
8
1 998
8
0 997
8
2
8
1 997
8
0 996
8
2
8
1 996
8
0 995
8
2
8
1 995
8
0 994
8
2
8
1 994
8
0 993
8
2
8
1 993
8
0 992
8
2
8
1 992
8
0 991
8
2
8
1 991
8
0 990
8
2
8
1 990
8
0 989
8
2
8
1 989
8
0 988
8
2
8
1 988
8
0 987
8
2
8
1 987
8
0 986
8
2
8
1 986
8
0 985
8
2
8
1 985
8
0 984
...

result:

ok 

Test #25:

score: 0
Accepted
time: 8ms
memory: 3996kb

input:

1000
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1...

output:

8
0 999
8
2
8
0 998
8
2
8
0 997
8
2
8
0 996
8
2
8
0 995
8
2
8
0 994
8
2
8
0 993
8
2
8
0 992
8
2
8
0 991
8
2
8
0 990
8
2
8
0 989
8
2
8
0 988
8
2
8
0 987
8
2
8
0 986
8
2
8
0 985
8
2
8
0 984
8
2
8
0 983
8
2
8
0 982
8
2
8
0 981
8
2
8
0 980
8
2
8
0 979
8
2
8
0 978
8
2
8
0 977
8
2
8
0 976
8
2
8
0 975
8
2
...

result:

ok 

Test #26:

score: 0
Accepted
time: 62ms
memory: 3868kb

input:

999
1
1
1
1
1
2
1
1
1
1
1
1
1
2
1
1
2
1
1
1
1
2
1
2
2
2
1
1
2
1
2
2
2
2
2
1
2
2
1
2
2
2
2
2
2
2
2
2
2
2
1
2
2
2
2
2
2
2
2
2
1
2
2
2
2
2
2
2
2
2
2
2
2
2
1
2
2
2
2
2
2
2
2
2
2
2
2
1
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
1
2
2
2
2
2
2
2
2
2
2
2
2
1
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
...

output:

8
0 998
8
2
8
0 997
8
2
8
0 996
8
2
8
0 995
8
2
8
0 994
8
2
8
0 993
8
2
8
1 993
8
0 992
8
2
8
0 991
8
2
8
0 990
8
2
8
0 989
8
2
8
0 988
8
2
8
0 987
8
2
8
0 986
8
2
8
0 985
8
2
8
1 985
8
0 984
8
2
8
0 983
8
2
8
0 982
8
2
8
1 982
8
0 981
8
2
8
0 980
8
2
8
0 979
8
2
8
0 978
8
2
8
0 977
8
2
8
1 977
8
0 ...

result:

ok 

Test #27:

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

input:

999
1
1
1
2
1
2
1
1
1
1
2
1
1
2
2
2
1
1
1
1
1
2
1
1
2
1
2
1
1
2
1
2
2
2
1
2
2
2
1
2
2
2
1
2
2
2
2
1
2
2
2
1
2
2
2
2
2
2
2
2
2
2
2
1
2
2
2
2
2
2
2
2
2
2
2
2
1
2
2
2
2
2
1
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
1
2
2
2
2
2
2
2
2
2
2
1
2
2
2
2
2
2
2
2
2
...

output:

8
0 998
8
2
8
0 997
8
2
8
0 996
8
2
8
0 995
8
2
8
1 995
8
0 994
8
2
8
0 993
8
2
8
1 993
8
0 992
8
2
8
0 991
8
2
8
0 990
8
2
8
0 989
8
2
8
0 988
8
2
8
1 988
8
0 987
8
2
8
0 986
8
2
8
0 985
8
2
8
1 985
8
0 984
8
2
8
1 984
8
0 983
8
2
8
1 983
8
0 982
8
2
8
0 981
8
2
8
0 980
8
2
8
0 979
8
2
8
0 978
8
2
...

result:

wrong answer Wrong answer.

Subtask #3:

score: 0
Wrong Answer

Test #43:

score: 72.83
Acceptable Answer
time: 3ms
memory: 3720kb

input:

2
1
2
2
2

output:

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

result:

points 0.97106666670 points  0.97106666670

Test #44:

score: 75
Accepted
time: 3ms
memory: 3876kb

input:

2
1
1
1
1

output:

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

result:

ok 

Test #45:

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

input:

3
1
2
1
2
1
2

output:

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

result:

ok 

Test #46:

score: 73.59
Acceptable Answer
time: 3ms
memory: 3868kb

input:

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

output:

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

result:

points 0.98120 points  0.98120

Test #47:

score: 0
Wrong Answer
time: 0ms
memory: 3720kb

input:

10
1
2
1
2
2
2
2
2
2
2
6
3
3
3
4
4
4
4
3
4
4
5
6

output:

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

result:

wrong answer Wrong answer.