QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#551558#9245. Bracket Sequenceucup-team4752#TL 1ms5624kbC++203.9kb2024-09-07 17:20:482024-09-07 17:20:48

詳細信息

Test #1:

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

input:

5 20
(()()
1 1 2 1
1 1 3 1
1 1 4 1
1 1 5 1
1 2 3 1
1 2 4 1
1 2 5 1
1 3 4 1
1 3 5 1
1 4 5 1
2 1 3 1
2 1 4 1
2 1 5 1
2 2 3 1
2 2 4 1
2 2 5 1
2 3 5 1
2 4 5 1
1 1 5 2
2 1 5 2

output:

0
2
2
5
1
1
3
0
1
1
3
6
16
1
2
7
2
1
2
3

result:

ok 20 lines

Test #2:

score: -100
Time Limit Exceeded

input:

100000 1000000
)())))))())()()()(())))()())))()))))())))))()(()()))()()))((()()))()))((())(())())()(()))))()))(()()()()()(())(()((()))()((()(()))()))()))()()))(())))()()(()(()())())((()((()((())()(()()))())(())())())))))))((())(((()(())())))(()(((())())))(((((((((()))()())())(()))(())()()()()((()())...

output:

181731611
606201834
866530667
87902205
263424999
90749369
223768959
9982137
629947870
271071493
601597427
272414569
126239508
936473914
929957650
847531053
998037842
898297161
721408149
198286052
938606008
1522883
10157905
781158589
178739023
210487874
982847740
774347407
978507428
598457278
6273218...

result: