QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#294643#4824. Bracket-and-bar Sequencesucup-team244#0 2ms4024kbC++175.2kb2023-12-30 15:16:162023-12-30 15:16:17

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

input:

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

output:

0
46338924943872
13239692841149

input:

decode
3
1
0
4
46338924943872
5
13239692841149

output:

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

result:

ok 3 lines

Test #2:

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

input:

encode
1
1
(|)

output:

0

input:

decode
1
1
0

output:

(|)

result:

ok single line: '(|)'

Test #3:

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

input:

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

output:

6619846420553
0
1

input:

decode
3
2
6619846420553
1
0
2
1

output:

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

result:

ok 3 lines

Test #4:

score: 0
Wrong Answer
time: 2ms
memory: 3828kb

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:

7
6
6619846420558
5
4
3
6619846420555
6619846420557
6619846420556
13239692841108
13239692841107
19859539261659
21
20
6619846420572
19
18
17
6619846420569
6619846420571
6619846420570
13239692841122
13239692841121
19859539261673
16
15
6619846420567
14
11
6619846420563
13
12
6619846420564
10
9
8
661984...

input:

decode
1000
3
7
3
6
3
6619846420558
3
5
3
4
3
3
3
6619846420555
3
6619846420557
3
6619846420556
3
13239692841108
3
13239692841107
3
19859539261659
4
21
4
20
4
6619846420572
4
19
4
18
4
17
4
6619846420569
4
6619846420571
4
6619846420570
4
13239692841122
4
13239692841121
4
19859539261673
4
16
4
15
4
6...

output:

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

result:

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