QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#566514#122. Security Gate3un_larryfunc100 ✓732ms561856kbC++233.9kb2024-09-16 00:19:402024-09-16 00:19:40

Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 4
Accepted

Test #1:

score: 4
Accepted
time: 0ms
memory: 11996kb

input:

2
xx

output:

4

result:

ok single line: '4'

Test #2:

score: 4
Accepted
time: 32ms
memory: 75072kb

input:

100
(()())()()()(()()(())(()))(())()(()()())(()())()()()(())((()()(()())(((()(()()()())((((()())))))))))

output:

1

result:

ok single line: '1'

Test #3:

score: 4
Accepted
time: 0ms
memory: 3856kb

input:

97
)((()(()(()))()(()(()))(((()(())()()())(())(((((()())))())())(()((()(())))(()())(()()())(()((())(

output:

0

result:

ok single line: '0'

Test #4:

score: 4
Accepted
time: 2ms
memory: 12036kb

input:

4
xxx(

output:

6

result:

ok single line: '6'

Test #5:

score: 4
Accepted
time: 4ms
memory: 19876kb

input:

34
)())()()(()(())(()(((()))))(()()((

output:

0

result:

ok single line: '0'

Test #6:

score: 4
Accepted
time: 3ms
memory: 22784kb

input:

44
))))x)((()(x())x)())x)(()()())))())())(((())

output:

0

result:

ok single line: '0'

Test #7:

score: 4
Accepted
time: 0ms
memory: 15880kb

input:

24
))(((xx)((((())xx((()()(

output:

0

result:

ok single line: '0'

Test #8:

score: 4
Accepted
time: 23ms
memory: 72828kb

input:

100
(()))(()))((((())))(()))))(()(x()((((((())))((())())))((()))((())(()((()(()((((()()(x)x)()))((((()((

output:

0

result:

ok single line: '0'

Test #9:

score: 4
Accepted
time: 32ms
memory: 73144kb

input:

100
)))))((()x))))())((())))(()))((()()()))())()))()))()(x((())(((())(()(()()((((()))))())(((((()))())()

output:

3

result:

ok single line: '3'

Test #10:

score: 4
Accepted
time: 28ms
memory: 74076kb

input:

100
))(()((x(()())x((()()(()))()))()))((()((())x)(((()()))()))(()))))(()(((((((()))())x()((((())(((()(()

output:

0

result:

ok single line: '0'

Test #11:

score: 4
Accepted
time: 0ms
memory: 14120kb

input:

24
(((x)(x)((()((x))()())))

output:

8

result:

ok single line: '8'

Test #12:

score: 4
Accepted
time: 18ms
memory: 50600kb

input:

78
()((()(((((((((((()()()())((()))((())((())())()()))((())(())))(()))()))))))))x

output:

2

result:

ok single line: '2'

Test #13:

score: 4
Accepted
time: 13ms
memory: 43380kb

input:

70
((((((()()))((())()(()((x))(((())(())()((())()((())))))(x)))(()x)))))x

output:

14

result:

ok single line: '14'

Test #14:

score: 4
Accepted
time: 7ms
memory: 27548kb

input:

52
(((()()()()x)(()))((((x)()(((((((())(((())xx))))))))

output:

16

result:

ok single line: '16'

Test #15:

score: 4
Accepted
time: 27ms
memory: 74996kb

input:

100
(())()()(()())(((((((((((((()((((())())((()(()()((())())))(()()))()(())(((((())())))))))))))))))))))

output:

1

result:

ok single line: '1'

Test #16:

score: 4
Accepted
time: 19ms
memory: 72596kb

input:

100
(()(())(())((((()(((((())(()((((()()()()()(())))x))()())()))((((())()((()())())((()()(()))))))))))))

output:

2

result:

ok single line: '2'

Test #17:

score: 4
Accepted
time: 29ms
memory: 74404kb

input:

100
()()xx()()()(()())()()()(())((x())((()()(())())((())())(()(()(())(())()(()())(x(()))))()()(((()())))

output:

13

result:

ok single line: '13'

Subtask #2:

score: 8
Accepted

Dependency #1:

100%
Accepted

Test #18:

score: 8
Accepted
time: 4ms
memory: 27076kb

input:

48
))()())())))(()((xx(())(x((((x(())(())((x((x))()

output:

7

result:

ok single line: '7'

Test #19:

score: 8
Accepted
time: 16ms
memory: 67760kb

input:

96
x)))))(()))))((())()())x)))((x((())())))())))))(()())(()())(())((x)x)))()(x(()((()(()))x(x())(()

output:

0

result:

ok single line: '0'

Test #20:

score: 8
Accepted
time: 0ms
memory: 15440kb

input:

28
)x)xxxx))()(())(((x()xx)xxxx

output:

1621

result:

ok single line: '1621'

Test #21:

score: 8
Accepted
time: 27ms
memory: 58924kb

input:

86
(()xx())())(xx)(x(x))((((x())((xx(x((()))x(())(x)(()(((())())(()(()(((()((())))((())((

output:

0

result:

ok single line: '0'

Test #22:

score: 8
Accepted
time: 20ms
memory: 75108kb

input:

100
(((((())(()(x))())(((()(()()((()))))x()(())(())(x))(x))x)x)((((())x)x))))()((x(()((()(((x()()(((x()x

output:

4096

result:

ok single line: '4096'

Test #23:

score: 8
Accepted
time: 27ms
memory: 74616kb

input:

100
)(())()x(()x))))))x)(()(x(((()((()()))))(())()()(()())x(x(((()(((()((()(((x))((()))))(()((((x)))x)()

output:

0

result:

ok single line: '0'

Test #24:

score: 8
Accepted
time: 16ms
memory: 73060kb

input:

100
x)()(()()x()))(()(()))()))((x))(())()(x)x)))())))())((()())x))((()()()(()(x()))x(xx))(((x))(x()()(()

output:

114

result:

ok single line: '114'

Test #25:

score: 8
Accepted
time: 16ms
memory: 48464kb

input:

78
(())()((())x(x(x))((x)(()(()((x())()x))()))(())())))()x(((((())))))(()()))()()

output:

128

result:

ok single line: '128'

Test #26:

score: 8
Accepted
time: 3ms
memory: 25968kb

input:

46
()(()x((xx()x(()(()(()(())())x(()x(x((x)x)))x)

output:

1023

result:

ok single line: '1023'

Test #27:

score: 8
Accepted
time: 19ms
memory: 52648kb

input:

82
(())(x)())()()((((((()()((()((()()()xx(((x))))(())x)()))(x)x(x()()())()x(x()x))))x

output:

2304

result:

ok single line: '2304'

Test #28:

score: 8
Accepted
time: 0ms
memory: 13464kb

input:

22
((xxx)xx((xx(xxx)))x)x

output:

2720

result:

ok single line: '2720'

Test #29:

score: 8
Accepted
time: 31ms
memory: 72824kb

input:

100
(()((((())(x)(()()()()))()(())()))()((()()(()(((((x)xxx)x)(((x)))x()(()(x()(()()()))))()(((())))))))

output:

512

result:

ok single line: '512'

Test #30:

score: 8
Accepted
time: 25ms
memory: 72752kb

input:

100
((()()()())(()()(((()())(xx(())x))))))()()()()(()x()(()(((()))(()())))()(()())()()((())((xx())(())x)

output:

128

result:

ok single line: '128'

Test #31:

score: 8
Accepted
time: 24ms
memory: 75104kb

input:

100
()()((())((()(()()))))()()()()(()x()((xxx)())(x))()(()x)()()((())((x()(x)x)())((()x()())(())x)x(()))

output:

4096

result:

ok single line: '4096'

Subtask #3:

score: 18
Accepted

Dependency #1:

100%
Accepted

Dependency #2:

100%
Accepted

Test #32:

score: 18
Accepted
time: 0ms
memory: 12452kb

input:

18
xx(xxxxxxxxxx)xxxx

output:

33999

result:

ok single line: '33999'

Test #33:

score: 18
Accepted
time: 3ms
memory: 12928kb

input:

20
xxx()x(x(xxxxx)(xxxx

output:

8324

result:

ok single line: '8324'

Test #34:

score: 18
Accepted
time: 0ms
memory: 19692kb

input:

34
xx)x((xxx(xxxx()x(xx)xx(xxxx()x)()

output:

533461

result:

ok single line: '533461'

Test #35:

score: 18
Accepted
time: 0ms
memory: 11996kb

input:

16
xxxxxxxxxxxxxxxx

output:

35708

result:

ok single line: '35708'

Test #36:

score: 18
Accepted
time: 24ms
memory: 74268kb

input:

100
))))()))x((()(x)(((xx(()x())(x(x)()x)()x)(()()x((x)()((((()))(x()()((())(x(())x))))((()())(()))((xx)

output:

5861

result:

ok single line: '5861'

Test #37:

score: 18
Accepted
time: 22ms
memory: 74984kb

input:

100
(())())))(()(()((xx)(x()))(((((())(())(()(()((x())))()xx()))(x(x((()))()(x)))x)())((xx)(xxx()xx)()x)

output:

141184

result:

ok single line: '141184'

Test #38:

score: 18
Accepted
time: 38ms
memory: 72868kb

input:

100
(()()x(((()(())))x(xx))((()(xx)()x(())x)(x)x()(xx)()))(())x)x()()x()x)(()()xx)(())(()(())(()xx)(())(

output:

65704

result:

ok single line: '65704'

Test #39:

score: 18
Accepted
time: 3ms
memory: 11984kb

input:

16
xxxxxxxxxxxxxxxx

output:

35708

result:

ok single line: '35708'

Test #40:

score: 18
Accepted
time: 15ms
memory: 56676kb

input:

86
(()()x)())(x)()()(xx)x(())x((x)x(x(()(x)(x()())(xx)(()((((xxx)x())x()()))))x))))(x()))

output:

1014061

result:

ok single line: '1014061'

Test #41:

score: 18
Accepted
time: 12ms
memory: 52748kb

input:

82
(((((()(())xx))(((x)((())x(x())x)(()(((x()x)(((xx)()()xx)xx(x))xx()x(())()))))x))x

output:

690240

result:

ok single line: '690240'

Test #42:

score: 18
Accepted
time: 15ms
memory: 67712kb

input:

96
(()()xx)x)x)(()()((xx(xx()))))x())(()((x(()x))())(x()))(())x()(((x)((x(()())())(x()(())()(xxx))x

output:

462358

result:

ok single line: '462358'

Test #43:

score: 18
Accepted
time: 38ms
memory: 74996kb

input:

100
((()(x))x((((((()())()x))x(x(x(())))()x)x(())()((()x()x(())x))))()))x(x))())((((x()((xxx(((x))))))x)

output:

483680

result:

ok single line: '483680'

Test #44:

score: 18
Accepted
time: 18ms
memory: 73160kb

input:

100
()x(()))((()))()(((((x)()()xx()))(((x((x)((x()))x((((()((x(()((x)x()((()((x((x()))()x)())())x))))x))

output:

33090

result:

ok single line: '33090'

Test #45:

score: 18
Accepted
time: 28ms
memory: 74696kb

input:

100
(((()((()x))()))(x((x)x((()(x((x))))x)x))))x()((()))(((((()())(xx)((x)))()()((()(x)(x(x))x)x()))xx)x

output:

593205

result:

ok single line: '593205'

Subtask #4:

score: 43
Accepted

Dependency #1:

100%
Accepted

Dependency #2:

100%
Accepted

Dependency #3:

100%
Accepted

Test #46:

score: 43
Accepted
time: 2ms
memory: 9888kb

input:

2
xx

output:

4

result:

ok single line: '4'

Test #47:

score: 43
Accepted
time: 26ms
memory: 74376kb

input:

100
()((())()())(())()(()(()((()(()(()((()))())((()()))((()()()))))()(()(()((()((())))((())()(()))))))))

output:

1

result:

ok single line: '1'

Test #48:

score: 43
Accepted
time: 0ms
memory: 3748kb

input:

45
xxxxxxxxxx((x(x(xx((xxxxxxx(xx(xx(xxx)x(xxxxx

output:

0

result:

ok single line: '0'

Test #49:

score: 43
Accepted
time: 29ms
memory: 70088kb

input:

96
)xx)(()(xx(x)())x)x)x((xx)xxx()((x)x)x)x((x))x(((()))xxx(()xx(xxx)((()()(x(x()())xx)x)(xx(x()x()

output:

77848412

result:

ok single line: '77848412'

Test #50:

score: 43
Accepted
time: 3ms
memory: 35268kb

input:

60
xxxxxxx)xx(xxxxxx)xxxxx(xxxx(xx)x)xxxx)xxxxx(x(x(xx()xxx(xxx

output:

988515207

result:

ok single line: '988515207'

Test #51:

score: 43
Accepted
time: 0ms
memory: 13344kb

input:

22
xxxxxxxxxxxxxxxxxxxxxx

output:

1955570

result:

ok single line: '1955570'

Test #52:

score: 43
Accepted
time: 24ms
memory: 52556kb

input:

82
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

output:

598801371

result:

ok single line: '598801371'

Test #53:

score: 43
Accepted
time: 31ms
memory: 72940kb

input:

100
xxxx(x)x(x)x(xx))(x)xxxx(xxxx)(x(x(xx)x)(x()(x))(())xxxx)())(xxx((x()((xx()x((((xxxxxxx)xxxx)(x(xx))

output:

407359237

result:

ok single line: '407359237'

Test #54:

score: 43
Accepted
time: 31ms
memory: 74744kb

input:

100
xxxxxxxxx)x(xxxxx)xxxxxxx)x)xxx)x())xxxx(x(((xxxxxx(x((()xx)xx()xxxx))xxxxxxxx(xx(xx()x(x()xxxxx(x)x

output:

305743173

result:

ok single line: '305743173'

Test #55:

score: 43
Accepted
time: 45ms
memory: 72908kb

input:

100
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

output:

685691690

result:

ok single line: '685691690'

Test #56:

score: 43
Accepted
time: 3ms
memory: 22940kb

input:

44
(x)x)x(xxx)(())(()(()xxxx(xxxxxxx()()xxx((x)

output:

1141552

result:

ok single line: '1141552'

Test #57:

score: 43
Accepted
time: 4ms
memory: 20668kb

input:

36
xxxxx(xxxx(x)x(xxxxx(xxxxx)xxxx)xxxx

output:

200422525

result:

ok single line: '200422525'

Test #58:

score: 43
Accepted
time: 0ms
memory: 18804kb

input:

36
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

output:

543075284

result:

ok single line: '543075284'

Test #59:

score: 43
Accepted
time: 20ms
memory: 41060kb

input:

70
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

output:

286582712

result:

ok single line: '286582712'

Test #60:

score: 43
Accepted
time: 27ms
memory: 73140kb

input:

100
((xxxxxx)(xx(x(x(x((xx)xx((xxxx)xxxxx)x((xx)))((x)()x(xx)x((()()(xxxxx)(x)(x)xxx()(()xx)x))xx))xxxxx

output:

711075853

result:

ok single line: '711075853'

Test #61:

score: 43
Accepted
time: 33ms
memory: 73200kb

input:

100
()()((x)x())xxxxxx((xx()(xx)))xx)(()x()x(x)xx())((()(((x)x)x(x()(x))xx((xx(x()()()())))xx))x))x))))x

output:

819964975

result:

ok single line: '819964975'

Subtask #5:

score: 27
Accepted

Dependency #1:

100%
Accepted

Dependency #2:

100%
Accepted

Dependency #3:

100%
Accepted

Dependency #4:

100%
Accepted

Test #62:

score: 27
Accepted
time: 319ms
memory: 323000kb

input:

226
xxxxxxxxxxxxxxxxxxxx)xxxxxxxxxxxxxxxxxxxxxxxxxx(xxxxxxxxxx)xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx)xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx)xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx(xxxxxxxxxxxxxxxxxxxxxxx

output:

311662824

result:

ok single line: '311662824'

Test #63:

score: 27
Accepted
time: 280ms
memory: 314084kb

input:

222
x)())((xxx()x))x(x))x(xx(((xx)(x(((xxxx(x))x(x(xxx((xxx()xxxxxxxx))x(()()xxxxxxxx()x(xx)xxxxxx)(x(x(xxx(x))()((xx)(xxxx(xxxxx)xx(x())xx(x((xx)x)()xxx()xxxxx((x(((xxxxxxx(())x)xxxxxxx(xx()())xxxxx(xxxx())x())xxx(x())xx)x((x

output:

617635509

result:

ok single line: '617635509'

Test #64:

score: 27
Accepted
time: 142ms
memory: 165112kb

input:

158
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

output:

716446269

result:

ok single line: '716446269'

Test #65:

score: 27
Accepted
time: 85ms
memory: 121520kb

input:

134
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

output:

963748902

result:

ok single line: '963748902'

Test #66:

score: 27
Accepted
time: 639ms
memory: 561688kb

input:

300
xxxxxxxx)xx))xxxxx)xx(xx(xxx)xxxxx))xx))xx(xxxxx)xxx(xxxxxxxxxxx)xxxxxxxxxxx)xxxxxxx(xx(x)xxxx)xxxx)x)x)(x)x(x)))(xx(x(xx)xxxxxx)(xxxx(xxxxxx)xxxxxx)xxxxxxx(xxx)(x(xxx((x()xxxxxxxxxxx)xxxxxxxxx)xx(x(xxxxxxxx)xxxxxxxxxxxx)xxxx(xx()xxxxx)x(xxxxxxxxxx)xxxx(xxxxx()xxx)xxx)xxxxxxxxxxxx)xxxx)xxxxxxxxx...

output:

380753516

result:

ok single line: '380753516'

Test #67:

score: 27
Accepted
time: 587ms
memory: 559340kb

input:

300
)x)))x)x)x))xx)()()(x(xxx)x)(()x())(x()x((x)(())()x)xx)(xxxx))x)(x)x)x(((()(()))((()(x)()((xxx)(x)xxx)(x(())(()))())(())x()x)xx())x)(x)(xxx(x))((x)(((x)((()x()x))()x)))x)x))()()x((x)(((x(x))(((x)xx)))))(x)xx)x(x(((xxx)x(((xxx))x)xx()))x((xx()x)((x)(x(()xx)xx)))())))x((x(xx)x)x)((x)()()(xx()(x((x...

output:

674716216

result:

ok single line: '674716216'

Test #68:

score: 27
Accepted
time: 732ms
memory: 561856kb

input:

300
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...

output:

511488504

result:

ok single line: '511488504'

Test #69:

score: 27
Accepted
time: 124ms
memory: 182240kb

input:

166
((((()()))(())()()()(x))()x())(x((()x)(()x)((())())(x)()(xxx(())x(()()))((())(((x)x()((x)(x())((x()x)))(()xx)x)()()(xx((x())))())())xx()()()(())(())()((((x)()x(x)))x)

output:

254137024

result:

ok single line: '254137024'

Test #70:

score: 27
Accepted
time: 161ms
memory: 233180kb

input:

190
(x()()(((((())((()x()(x))((())(((())((()()(((()x())))((((((x))xx()x))())x()()))x()))()(x(x)((x)))(((())x)((((x())xx)x))x)x(x(x)())())((x((())x((()()))()(()))x)((((()))))(())(x))()))))x))))x)

output:

268435456

result:

ok single line: '268435456'

Test #71:

score: 27
Accepted
time: 56ms
memory: 93820kb

input:

116
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

output:

369003267

result:

ok single line: '369003267'

Test #72:

score: 27
Accepted
time: 81ms
memory: 124560kb

input:

136
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

output:

339830910

result:

ok single line: '339830910'

Test #73:

score: 27
Accepted
time: 694ms
memory: 559640kb

input:

300
(xx)xxx(x)(xxx)x)xxxxxxxxx(xxxx)((x(xx)xxxx((x(xxxx)xxxxxxxxx)xxx))xxxx)xxxxxxxx()xxxxxxxxxxxxxxxxxxxxx)xxxxxxxxxxxxxxx)xxxxxxx(xxxxxxxxx)xxxxxx)xxx((((xx)xxxx)xxxxxx(xxxxx)x()xx((xxxxxxxx)xxx)xxxxxxx(xxxxxxxxx)xx(xxxxxxxx)x)xxxxxx(xxxxxxxxxxxxxxx(xxxx)xx)xx)xxxx)xxxxxxxxxxxxxx)xxxxx)xxx)xxx)x)x...

output:

199242412

result:

ok single line: '199242412'

Test #74:

score: 27
Accepted
time: 511ms
memory: 561520kb

input:

300
(x(((()()()())(())((xx)))x((((()())()((x)((((((()))(()())())()())()))(((()((x((()x))((()())())(())()(xx))))()(((()()(()())()(x)x))x)())x(())())(x(()x())()())()))()))(())(((()(()()()(x()x)))(()(())))))))(x()()x)()()(((((()(()))(x)((()()()()))()(())))())()()()()((()))(())()(x(())x((())))()((())()(...

output:

3858728

result:

ok single line: '3858728'

Extra Test:

score: 0
Extra Test Passed