QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#294473#4824. Bracket-and-bar Sequencesucup-team878#0 1ms3548kbC++202.9kb2023-12-30 13:59:502023-12-30 13:59:51

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

input:

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

output:

0
7
185

input:

decode
3
1
0
4
7
5
185

output:

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

result:

ok 3 lines

Test #2:

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

input:

encode
1
1
(|)

output:

0

input:

decode
1
1
0

output:

(|)

result:

ok single line: '(|)'

Test #3:

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

input:

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

output:

1
0
3

input:

decode
3
2
1
1
0
2
3

output:

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

result:

ok 3 lines

Test #4:

score: 0
Wrong Answer
time: 1ms
memory: 3512kb

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:

0
6
2
9
13
15
7
1
5
5
11
3
0
12
4
18
26
30
14
2
10
10
22
6
17
57
25
37
99
35
53
61
29
115
59
63
31
51
27
27
47
15
1
41
9
5
21
29
13
5
67
3
21
51
19
21
45
13
83
43
55
23
19
11
11
39
7
0
24
8
36
52
60
28
4
20
20
44
12
34
114
50
74
198
70
106
122
58
230
118
126
62
102
54
54
94
30
2
82
18
10
42
58
26
10...

input:

decode
1000
3
0
3
6
3
2
3
9
3
13
3
15
3
7
3
1
3
5
3
5
3
11
3
3
4
0
4
12
4
4
4
18
4
26
4
30
4
14
4
2
4
10
4
10
4
22
4
6
4
17
4
57
4
25
4
37
4
99
4
35
4
53
4
61
4
29
4
115
4
59
4
63
4
31
4
51
4
27
4
27
4
47
4
15
4
1
4
41
4
9
4
5
4
21
4
29
4
13
4
5
4
67
4
3
4
21
4
51
4
19
4
21
4
45
4
13
4
83
4
43
4
55
...

output:

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

result:

wrong answer 9th lines differ - expected: '((|)|(|))', found: '((|)(|)|)'