QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#294310#4824. Bracket-and-bar Sequencesucup-team1293#0 3ms3552kbC++173.5kb2023-12-30 11:47:442023-12-30 11:47:45

详细

Test #1:

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

input:

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

output:

0
10
191

input:

decode
3
1
0
4
10
5
191

output:

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

result:

ok 3 lines

Test #2:

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

input:

encode
1
1
(|)

output:

0

input:

decode
1
1
0

output:

(|)

result:

ok single line: '(|)'

Test #3:

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

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
Wrong Answer
time: 3ms
memory: 3516kb

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
9
10
7
4
0
1
8
5
6
2
3
54
52
53
50
45
41
42
51
46
47
43
44
48
37
39
34
30
31
26
16
17
14
4
0
1
15
5
6
2
3
49
38
40
35
27
20
21
36
32
33
28
18
19
29
24
25
22
11
7
8
23
12
13
9
10
272
270
271
268
261
257
258
269
262
263
259
260
266
251
253
246
242
243
227
217
218
215
205
201
202
216
206
207
203
204...

input:

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

output:

(|)(|)(|)
(|)(|(|))
(|)((|)|)
(|(|))(|)
(|(|)(|))
(|(|(|)))
(|((|)|))
((|)|)(|)
((|)|(|))
((|)(|)|)
((|(|))|)
(((|)|)|)
(|)(|)(|)(|)
(|)(|)(|(|))
(|)(|)((|)|)
(|)(|(|))(|)
(|)(|(|)(|))
(|)(|(|(|)))
(|)(|((|)|))
(|)((|)|)(|)
(|)((|)|(|))
(|)((|)(|)|)
(|)((|(|))|)
(|)(((|)|)|)
(|(|))(|)(|)
(|(|))(|(|)...

result:

wrong answer 81st lines differ - expected: '(|)(|(|))(|(|))', found: '(|(|))(|)((|)|)'