QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#294283#4824. Bracket-and-bar Sequencesucup-team1293#0 0ms3788kbC++173.5kb2023-12-30 11:18:172023-12-30 11:18:19

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

input:

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

output:

0
10
177

input:

decode
3
1
0
4
10
5
177

output:

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

result:

ok 3 lines

Test #2:

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

input:

encode
1
1
(|)

output:

0

input:

decode
1
1
0

output:

(|)

result:

ok single line: '(|)'

Test #3:

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

input:

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

output:

1
0
0

input:

decode
3
2
1
1
0
2
0

output:

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

result:

ok 3 lines

Test #4:

score: 0
Stage 2: Program answer Runtime Error

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:

11
7
8
9
4
0
1
10
5
6
2
3
54
48
49
50
34
30
31
51
35
36
32
33
52
37
39
43
39
40
26
14
15
16
4
0
1
17
5
6
2
3
53
38
40
44
27
18
19
45
41
42
28
20
21
29
22
23
24
11
7
8
25
12
13
9
10
272
264
265
266
235
231
232
267
236
237
233
234
268
238
240
244
240
241
169
157
158
159
147
143
144
160
148
149
145
146...

input:

decode
1000
3
11
3
7
3
8
3
9
3
4
3
0
3
1
3
10
3
5
3
6
3
2
3
3
4
54
4
48
4
49
4
50
4
34
4
30
4
31
4
51
4
35
4
36
4
32
4
33
4
52
4
37
4
39
4
43
4
39
4
40
4
26
4
14
4
15
4
16
4
4
4
0
4
1
4
17
4
5
4
6
4
2
4
3
4
53
4
38
4
40
4
44
4
27
4
18
4
19
4
45
4
41
4
42
4
28
4
20
4
21
4
29
4
22
4
23
4
24
4
11
4
7
4...

output:

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

result: