QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#294602#4824. Bracket-and-bar Sequencesucup-team1223#0 0ms3628kbC++233.9kb2023-12-30 14:54:102023-12-30 14:54:11

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

input:

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

output:

0
54
65

input:

decode
3
1
0
4
54
5
65

output:

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

result:

ok 3 lines

Test #2:

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

input:

encode
1
1
(|)

output:

0

input:

decode
1
1
0

output:

(|)

result:

ok single line: '(|)'

Test #3:

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

input:

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

output:

2
0
1

input:

decode
3
2
2
1
0
2
1

output:

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

result:

ok 3 lines

Test #4:

score: 0
Stage 2: 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:

0
1
2
3
5
17
29
6
14
9
10
11
0
1
2
3
5
17
29
6
14
9
10
11
12
13
14
18
73
128
25
80
135
190
300
960
1620
355
795
520
575
630
24
25
26
54
169
181
193
30
33
36
70
73
76
43
44
45
46
48
60
72
49
57
52
53
54
0
1
2
3
5
17
29
6
14
9
10
11
12
13
14
18
73
128
25
80
135
190
300
960
1620
355
795
520
575
630
24
...

input:

decode
1000
3
0
3
1
3
2
3
3
3
5
3
17
3
29
3
6
3
14
3
9
3
10
3
11
4
0
4
1
4
2
4
3
4
5
4
17
4
29
4
6
4
14
4
9
4
10
4
11
4
12
4
13
4
14
4
18
4
73
4
128
4
25
4
80
4
135
4
190
4
300
4
960
4
1620
4
355
4
795
4
520
4
575
4
630
4
24
4
25
4
26
4
54
4
169
4
181
4
193
4
30
4
33
4
36
4
70
4
73
4
76
4
43
4
44
4
...

output:

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

result: