QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#295560#4824. Bracket-and-bar Sequencesucup-team28950 0ms3984kbC++143.4kb2023-12-31 12:34:192023-12-31 12:34:20

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

input:

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

output:

1
55
66

input:

decode
3
1
1
4
55
5
66

output:

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

result:

ok 3 lines

Test #2:

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

input:

encode
1
1
(|)

output:

1

input:

decode
1
1
1

output:

(|)

result:

ok single line: '(|)'

Test #3:

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

input:

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

output:

3
1
2

input:

decode
3
2
3
1
1
2
2

output:

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

result:

ok 3 lines

Test #4:

score: 0
Stage 1: Program answer Time 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:

1 12
2 12
3 12
4 12
6 12
7 12
8 12
5 12
9 12
10 12
11 12
12 12
1 55
2 55
3 55
4 55
6 55
7 55
8 55
5 55
9 55
10 55
11 55
12 55
13 55
14 55
15 55
19 55
20 55
21 55
26 55
27 55
28 55
29 55
31 55
32 55
33 55
30 55
34 55
35 55
36 55
37 55
16 55
17 55
18 55
22 55
38 55
39 55
40 55
23 55
24 55
25 55
41 55
...

input:


output:


result: