QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#323364#4824. Bracket-and-bar SequencesZhangYiDe0 1ms3884kbC++203.4kb2024-02-09 11:59:172024-02-09 11:59:17

詳細信息

Test #1:

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

input:

encode
3
1
(|)
4
((((|)|)|)|)
5
(|(|))((|(|))|)

output:

1
60
225

input:

decode
3
1
1
4
60
5
225

output:

(|)
((((|)|)|)|)
(|(|))((|(|))|)

result:

ok 3 lines

Test #2:

score: 100
Accepted
time: 0ms
memory: 3884kb

input:

encode
1
1
(|)

output:

1

input:

decode
1
1
1

output:

(|)

result:

ok single line: '(|)'

Test #3:

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

input:

encode
3
2
((|)|)
1
(|)
2
(|(|))

output:

3
1
4

input:

decode
3
2
3
1
1
2
4

output:

((|)|)
(|)
(|(|))

result:

ok 3 lines

Test #4:

score: 0
Stage 1: Program answer Memory Limit Exceeded

input:

encode
1000
3
(|)(|)(|)
3
(|)(|(|))
3
(|)((|)|)
3
(|(|))(|)
3
(|(|)(|))
3
(|(|(|)))
3
(|((|)|))
3
((|)|)(|)
3
((|)|(|))
3
((|)(|)|)
3
((|(|))|)
3
(((|)|)|)
4
(|)(|)(|)(|)
4
(|)(|)(|(|))
4
(|)(|)((|)|)
4
(|)(|(|))(|)
4
(|)(|(|)(|))
4
(|)(|(|(|)))
4
(|)(|((|)|))
4
(|)((|)|)(|)
4
(|)((|)|(|))
4
(|)((|)...

output:


input:


output:


result: