QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#691235#3079. Joining The Bricks TogetherxiebohangAC ✓613ms3132kbC++171.2kb2024-10-31 10:30:492024-10-31 10:30:52

詳細信息

Test #1:

score: 100
Accepted
time: 613ms
memory: 3132kb

input:

44279
1
1 B
1
1 W
2
1 B
1 W
2
1 W
1 W
3
1 B
1 B
1 W
3
1 W
1 B
1 W
3
1 B
1 W
1 W
3
1 W
1 W
1 W
4
1 B
1 B
1 B
1 W
4
1 W
1 B
1 B
1 W
4
1 B
1 W
1 B
1 W
4
1 W
1 W
1 B
1 W
4
1 B
1 B
1 W
1 W
4
1 W
1 B
1 W
1 W
4
1 B
1 W
1 W
1 W
4
1 W
1 W
1 W
1 W
5
1 B
1 B
1 B
1 B
1 W
5
1 W
1 B
1 B
1 B
1 W
5
1 B
1 W
1 B
1 B
...

output:

1
1
1
2
1
1
1
3
1
2
2
1
1
1
1
4
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
5
1
2
2
2
2
3
3
1
1
3
3
2
2
2
2
1
1
2
2
2
1
2
2
1
1
1
1
1
1
1
1
6
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
7
1
2
2
1
2
1
1
2
2
1
1
2
1
3
3
1
1
1
1
3
1
4
...

result:

ok 44279 lines

Test #2:

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

input:

3
3
1 B
3 W
2 B
4
3 W
3 B
9 W
1 B
2
2 W
3 W

output:

2
3
5

result:

ok 3 lines