QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#547630#126. Balanced Strings5un_xiaomivita_mboxAC ✓382ms19220kbC++143.8kb2024-09-05 00:25:482024-09-05 00:25:49

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 46ms
memory: 6704kb

input:

37589
))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))...

output:

0

result:

ok single line: '0'

Test #2:

score: 0
Accepted
time: 68ms
memory: 7796kb

input:

50247
))))))))))())))))))))))))))))))))))))))()))))))))))())()))))))))))))))))))))()))))))))))()))))))())))))))))))()))))))))))))))()))())))))))))))))))))))))(())))))(()))))()())))))))())))())()))))))))))))))))))))))))))))))())))))))))))))))())())))))())))()))))()))))))))))))()))()))))))))))()))))))...

output:

23079

result:

ok single line: '23079'

Test #3:

score: 0
Accepted
time: 82ms
memory: 8216kb

input:

56977
)))))))))()))()()))())))))()))))))))()())))()))))(())())())())))))())()))())()))))))())))))))))()()())))))())))))()))))())(()())))))))))))))))))))))))))())())))))))()(()()))))))))()())))())))))))))((()(()))))))))))))))))))()))))))))()(()))))))))))(())))))))))())))))))))))())))))))))(())))))())...

output:

994794

result:

ok single line: '994794'

Test #4:

score: 0
Accepted
time: 161ms
memory: 11964kb

input:

98567
)))()))()()))))))))))))))))))()))()()((((()))))())(())))()))((()(()))))())))()())))))())((()))((())())())))(())()()(()()()))(())))))()(())()()()(()))))())))))())(()))((((())()))()())))))))))())))))(())(()))()()()))()))))))))))()))))((())(()))())))(()()()()()))((()))()())))))))()()())((()))))))...

output:

15650664

result:

ok single line: '15650664'

Test #5:

score: 0
Accepted
time: 41ms
memory: 5612kb

input:

27916
())(()))))))()))((()((())()))()))())))(())(())(()))(()()))))())))(((()))))()()()))))()()((()())()())))()))))))))(())()))))()())()())(((()((()((()(((()(())()()))))))()))))))())((()))()((()()())(((((((()(()()))(())))(()())(()(())))()(()))())))))((((()()()()))()()(()()())()()(()())((())(())(())))...

output:

5339607

result:

ok single line: '5339607'

Test #6:

score: 0
Accepted
time: 105ms
memory: 9108kb

input:

69001
()(()))))()()())))()(()))))()))(())())((()))))((()(()()))()())()))()(()))((()))))(())(()(()()()()()()(()(())))(()())))()(())()())())((((()))()))((())())(())()(((()((()((())((()())))(((()()()))()))(((()())(((()(((())()((((((()))(()())))))((())(()(())))(()()()(()()()))()(()(()())(()()(((((((()()...

output:

49390858

result:

ok single line: '49390858'

Test #7:

score: 0
Accepted
time: 31ms
memory: 5024kb

input:

21304
((())(((())((((()))(((()))((((((()((((()(((()()()((()((((()(((((((((((()(()))(()()()()))((((((((((((())((((((((((()(((((()(())))((((((()))))()()))()())(()))))(((((()()(())((()(((((((()(((()()()())((((()(((()())(()((((())(((()(((((((((((()))())(())()())()(((((((()()()((()(()()))(())((((((())()(...

output:

2884692

result:

ok single line: '2884692'

Test #8:

score: 0
Accepted
time: 71ms
memory: 7080kb

input:

45253
())((((()()(())((((())()(((())))))()(((()((((()((())(((()))))((()(((((((((((()((((((()(()()((()()()()(()))((((((((((((((())((()(((((()()()((((((((((((((((()((()((((((((()))(()())(((((((()(()())()))((((()))((())()(()()))((((()((())()(()(((()(((()((())()()(())()(()((((((()((()(()()()((())(()))((...

output:

8601971

result:

ok single line: '8601971'

Test #9:

score: 0
Accepted
time: 48ms
memory: 6032kb

input:

32819
()(((((((((()((()((((((())((((((((((((()((()((((()((()(((((((()(((((()(((((((((()(((((()(()((((((((((((((())(((((((())()(()(((((()((((((()(((((((((((((((((((((((((()(((((()))((()((((()(((()(()(((()())(((()(((()(((())()(((((((((((((((((((((())(())()(()(())()((()(()(((((((((())((((()(((((()()(((...

output:

192545

result:

ok single line: '192545'

Test #10:

score: 0
Accepted
time: 131ms
memory: 10936kb

input:

93339
(((((((((((((((()(((((()()()(((((()(((((((((()((((((((()(()(((((((((((((((((((((((((()(((((((())()((((((((((()((((((((((((((((((((((((()((((((((((((((((()((((((((((()(((()(((((((()(((((()(((((()(((((((((((((((((()((((((()(((()((((((()()((((((((((((((((((()((((((()((((()(())(((()((((((()(((((((...

output:

53225

result:

ok single line: '53225'

Test #11:

score: 0
Accepted
time: 74ms
memory: 8192kb

input:

59383
((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((...

output:

0

result:

ok single line: '0'

Test #12:

score: 0
Accepted
time: 180ms
memory: 11808kb

input:

100000
())))()()))()((()(()()((())())((()))(()))()()(()()(())()((())())())))(()))())()))())))))((((()()(()()()()()())))))))((()))(((()())()()()(((((())(((()(())(()(())((())))()()()((())))()((((((()))()(((())())((()(())))(((()((()())(()(()((((()()((())()((()())(()(()))(())(()(()((((()((()())()(()()((...

output:

86558204

result:

ok single line: '86558204'

Test #13:

score: 0
Accepted
time: 178ms
memory: 11656kb

input:

100000
(())((())(()(()()))()(((())))(())())(()())()))))()((()(((()))((()((()()())))()(())()()()()()(()((()(())()))((()())(((())(()(((())()()(()))(())())())(()()()))))()(()))()()((()(((()())())())))))(((())))()((())()(()()()()()())())(()())())))(()())))()()(()()()((())))((())))))(()()))((())))())((((...

output:

85291914

result:

ok single line: '85291914'

Test #14:

score: 0
Accepted
time: 190ms
memory: 11852kb

input:

100000
))(()()))))())()())(()()))))(()))()()(()((()()((((()))(((())())())()))())()()()))))(((()(()())((((((()))))))()())((()()))((((())()())()()()()))(()((((()()))()(()))(()()))())())(())()(()((()(()(()))(((()))))))()()()())()))()())())()))(()(()())()()(()))(((((())()()())))())())(())((()(()))()))()...

output:

81274356

result:

ok single line: '81274356'

Test #15:

score: 0
Accepted
time: 193ms
memory: 11924kb

input:

100000
((()()(((()(()))((((()()(()(((()())(()())((()(()))()(()(()()))))(()(()()((()((()())()(((()(())()()()()((((()(()))()))))))))()())))(()((((()((())))()(()))))(())(()()(()())))()())))(()())(((((()))())((((()((()))()((())())()(()(()())))()()()())))(((())))(()()((()))(())(()())()())(())()))))()))))...

output:

95427650

result:

ok single line: '95427650'

Test #16:

score: 0
Accepted
time: 170ms
memory: 11920kb

input:

100000
))()))))(()())))()()()()(())(((()()())))(((((())()()(()))()()()(((((((()())()()()(()((()))(()((())((()())((()(())))((()()()())(())(())())))()())()())()))(()()))()((()()()())))()))(()((((((()(()(((()((()))(()((()))(()((()())()))((((()())()))))))))()())))((()))()()()))(()((()(()(()()())())))())...

output:

84225313

result:

ok single line: '84225313'

Test #17:

score: 0
Accepted
time: 208ms
memory: 13964kb

input:

67928
))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))...

output:

0

result:

ok single line: '0'

Test #18:

score: 0
Accepted
time: 251ms
memory: 14996kb

input:

74375
))))))()()))))())(((())))))))((()))())))))())))()))))))))))))))))))))))))(()))()()))))))()))))))))))))))))))))))())))())))))))))))()))))))))))))))))))))))))))))))))))))()))))))))))))()())))))))))))))))())(())()))))()))))))))))))))))))))))))))))))))())(())))))())))))))))))))))))))))))))))))))))...

output:

16424

result:

ok single line: '16424'

Test #19:

score: 0
Accepted
time: 120ms
memory: 10040kb

input:

43700
))()))))))()))))()))))))))))())))))))))))))))))))())())()))))())))())())())))())()))))))))))()))))))())))))()))()))())))))))()())()))((()))))()))))))))((())()))))))()))((())))))(())))))))()()())((((()())))))()))))(())))))(())(()))))()()())))))()))))()))))))))))))()))))))))))()))((())((()))))()...

output:

21924

result:

ok single line: '21924'

Test #20:

score: 0
Accepted
time: 173ms
memory: 12032kb

input:

55191
))()))())())))))()))())(())())((())())))))())))))()))))())))))()))(())))))))(())))(())))))()(()))((()))((()))))()))()))((())()))())))))())())))()))))))())))))()))()()((())())()))))))))))))))())))(()))())))())())))()))))()))))()))))())()((()))))))()))()))))))())))()))())())())()()))))()))()))()...

output:

47224

result:

ok single line: '47224'

Test #21:

score: 0
Accepted
time: 73ms
memory: 7588kb

input:

28230
())((()))))())))())))()())(())()))()(()()(()))))))((()()))))))(())())(()(())))())()))))))))))))()()())()()()((()(())())())(()())))))))()))))())()()(()))())))()(()()))))()(())))))((((((())()()((()(()())))())())))()()((()()()))(()(()(()))())()()))))))())())())())))(((((())))((((((())()()))(()()(...

output:

37491

result:

ok single line: '37491'

Test #22:

score: 0
Accepted
time: 368ms
memory: 18580kb

input:

99972
)((()))(((((()((()((())((())((()()))()()()()))(()))))(())())())))())))))()((((((()))))))())))(()((())))(((()))((()()((())())(()())(()()(()()()((())(()()))()))))))()(()()()))(()(())((())((()((((()()(())))())()(((())()())()((())))))(())))))))()()())()(()(((((())))()))())())())()((()))((()(()(())...

output:

199386

result:

ok single line: '199386'

Test #23:

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

input:

60778
()()((((((((((((()))))(())(((((())()(((((()((())(()()())))())()))()(()(((()())))((())))))()(()()((((()(()())()((())(()(((()())()()(()(((((((()()()(((()((()(((()))()(()))))(()()(()(((()())))(((((((()()(((((((()(((((((()((()()()()())(()(()()()((((())((())))))((((()((((()(())(())()))()(((())(((()...

output:

81154

result:

ok single line: '81154'

Test #24:

score: 0
Accepted
time: 345ms
memory: 17752kb

input:

98456
()((((()((()(()(()(())(((()()))(((()(()()(((((()()((())((()((((((()()((((()((((()()(()(((((()(((((()(()((()))(()())((((())()(()()(((()(()(()()())()((((()(()))((())((()(()(((((((()(())(((((((((((((((())()((((()(((())()(((()()((((((((())(((((()()(()((()))(((()(())((()(((())(((((((()))()())((()((...

output:

84235

result:

ok single line: '84235'

Test #25:

score: 0
Accepted
time: 46ms
memory: 6028kb

input:

19318
)(((())()))())(()()((((((()(((()(()((()(())((((((()()))(((((((()(((((()((((()((((()(()(((((((((((((((((((((((()(()((((((((((((())(((((()()(((()((((((((()((())(()((((())(((((()((()()((()()(((((((((((((((((((((()((((((())(((((((()(((()((()((()(()((()(((((((((((()(()((()(((((()((((((())(((((()(((...

output:

9687

result:

ok single line: '9687'

Test #26:

score: 0
Accepted
time: 1ms
memory: 3640kb

input:

114
(((()((((((((((((((((()(((((()((((((((((((()((()(((((()((((((((((((((((((()((((((((((((()(((((((((()()(()(((((((()
19 14
20 58
38 90
113 11
57 98
92 57
52 7
53 33
112 84
83 34
82 100
60 35
61 75
103 38
45 36
69 66
5 59
12 53
2 32
28 112
30 93
88 78
108 61
91 43
84 111
86 83
79 29
76 110
24 37
35...

output:

28

result:

ok single line: '28'

Test #27:

score: 0
Accepted
time: 138ms
memory: 10844kb

input:

51196
((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((...

output:

0

result:

ok single line: '0'

Test #28:

score: 0
Accepted
time: 347ms
memory: 18716kb

input:

100000
()()((())())((())(())()()()()((()))()((()())))(()(()()))))(((())(((()(()()))))((((()((((()()(()()(())))))))(())()((((()(())(()))))())())(()(())()))(()()(()))((((((()))((()((())(())))(()))()()((((())()))))))())))))(())()()))()()()(()))))()(((())))))((()))())(()(()(((()()(()()())(()((((((()())(...

output:

198658

result:

ok single line: '198658'

Test #29:

score: 0
Accepted
time: 360ms
memory: 18688kb

input:

100000
)))()(()))(((((())))((())()()(()((()))((()(((())((()(((()(((()())((())()()((())))(())))(()()))()((((())(())())()()))())())))))())()(()(()(()())(()(()())()()()())))(()()((())()))(()())(((()))))())()(())))))())((())()))()()))()))((()()))))())(((()(()())()()))(()))())(())(()(()))))))()))))(()()(...

output:

198838

result:

ok single line: '198838'

Test #30:

score: 0
Accepted
time: 382ms
memory: 18872kb

input:

100000
)()()()()())))))()((((()())(())()(()))(()(()()((())((()()))(()(((())))())((((((()()()))))))())))()())))()((((()(((()))()(((())()))((((((())((())())))()(())))(()()()())()(()(((())(((())(()()))(((((((((()((()())()()((((())((()())()))())))()()(((())))))()(())()))(())))))(()()(()))(()))))))))()))...

output:

199464

result:

ok single line: '199464'

Test #31:

score: 0
Accepted
time: 361ms
memory: 18460kb

input:

100000
)()()((()(()(((()(()()()())(()()())(()())(()()((())(()()))()()()(()((((())))))()())(()(((())()(()(()(()())))))))(()()))())(())())()))())(())((((((()(())()((())())())))())(((()()()()()))))(()))()())))((((()(()(((()))((()(()()(()()()()(()(()()(()())))()))()))()))())(()()()((()()()()()(((()(())(...

output:

197737

result:

ok single line: '197737'

Test #32:

score: 0
Accepted
time: 358ms
memory: 18936kb

input:

100000
)))()()()))())(())(()((((()))))()((((()))()()()(())()))((()(())))((()((()())((())()()()(())())))((()))))(())()()))((()(((((())(()())((()()((()))()()()(((()()))(()(()())))))(((())((((()())((()())))))())())()))((())(((()))(())(((()(())()()()()(((()()(()))))()))))()(((()))))))((())(()))())))))((...

output:

197044

result:

ok single line: '197044'

Test #33:

score: 0
Accepted
time: 37ms
memory: 11684kb

input:

93277
))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))...

output:

0

result:

ok single line: '0'

Test #34:

score: 0
Accepted
time: 23ms
memory: 9516kb

input:

67885
)())))))))))))))))))))))))))))())())))))))))))))))))()))))))()))))))))())))))))))))))))))))))))))()))()())))))))))))))))))))))))())))))))))))))))))))))))))))))))))))))())))))))))())()))))))))(())))))())()(()))))))))))))()))())))))))))))))))))())))))))))()())))))))))))())))))()))))))))())))))()...

output:

6788

result:

ok single line: '6788'

Test #35:

score: 0
Accepted
time: 28ms
memory: 9452kb

input:

67814
))))())))))))))())))((())))))))))()(()))))))))))()))())))(()())))))()))))()))))((())())))))))(())))()()))()(()()))))()))()))(()))())))))))(()()))))()))))())())))))()))))))))))())))))))(()))))))())))(()))))))())))))()))))))))))))())))())))))))))()))(())))()())))()))))()))))))))())())())(())))))...

output:

13562

result:

ok single line: '13562'

Test #36:

score: 0
Accepted
time: 21ms
memory: 8348kb

input:

57612
))()()))))()))())))))))))()))((()))))())())())))))))()))()()()))()))))(())))()))())()()((())())))(()()())))()()))))))(()()()()(())()())()(()))))))))())()))(()))(())()(()))))))()))))))()())()()(()))))(()))))(())(()))))(()())(())))(())))))))))(((())()()()))(()(()()))))))))))))()()))()()))((())))...

output:

17283

result:

ok single line: '17283'

Test #37:

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

input:

47785
))))(()((()(((((((((())())()())))))))())))()))))())))())))))))((()))((())())))))())))))))((()))()((())))())())))))))))(()(()((()))(((()((()))()())((())(()()))(()()()()())))()(())()()())))()()(()))()))())((())()()(((()))((()))((()))((((()(((()))(())(()()(((((())((()))())))))(()()()())))()))())(...

output:

28671

result:

ok single line: '28671'

Test #38:

score: 0
Accepted
time: 16ms
memory: 7800kb

input:

50600
)(((())))()((((()(()(())((()())(()())(()()())))()((()()()))((()()))))()))())))))(()()(((()))()())((((())(()(()))(()(()((())()((())()))(()(((()))))((())))(((()()(((((((()()))))))(()((((((((((())((()()()))))()))(()))())(()(((()((()(())()())())()))))()))()()())))()((((()(()))())(()())()()()()(()(...

output:

25300

result:

ok single line: '25300'

Test #39:

score: 0
Accepted
time: 6ms
memory: 4692kb

input:

16000
(()(()()(()()((()())()()(())(((()()(()((())()((()(((()(((()(()())(((())(((()))))(()(((())(())))()()(())()()(()(())((()(()())((()((((()(((())())))(())))))((()(()()((()((()(((()(()()())(()((())()(((())(()))()((((()()))()()()(((())((())()())(((())())())))((((((()()(()()((((()(()()((((()(())()())(...

output:

9600

result:

ok single line: '9600'

Test #40:

score: 0
Accepted
time: 6ms
memory: 6100kb

input:

33322
(())(((((((()(()(()(()())(()()()((()))())()(())((()())()((()((()()))((((()((()(()(((()(((((((((((((()((()(()()()(()))((((()((((((())(()(((()((((((((((((((()()()(((((((((((((((()(((((((()(((((((((()(((((()()()(((()(((()(()((())(((()((((((((((((()))(((()(((((()))(())(()()((()()())()((((((()(((((...

output:

9997

result:

ok single line: '9997'

Test #41:

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

input:

11048
((()))(((((((((((((((((((((((()((((((()(())((()(()(((()(((((()()))()((((((()(()((((()())((((((((((((()()((((()(((((((((()((((((((()((()(((()(((((()((((((()()(((((()())(((((((((((((())((((((((((((()(((()(((((((()))((((((((((((((((((()((((())((((((((((())(((()(()((()((()(())(()((()((((((((((((()...

output:

2210

result:

ok single line: '2210'

Test #42:

score: 0
Accepted
time: 33ms
memory: 10572kb

input:

82724
(()((((((((((((((((((((((((((((((((((((()()(()(()()((((((()(()(((((((((()((((((()))((()(((((()((((((((()(()(((((((()(((((((()(((((((((()((()(((()((()((((((((((((((((((((((((((((((((((((((((((((((((((((()((((((((((()(()((((((((((((((((()(((((()((((((()(((((()((()((((((((((((((((((((((((((((((((...

output:

8273

result:

ok single line: '8273'

Test #43:

score: 0
Accepted
time: 12ms
memory: 6620kb

input:

39744
((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((...

output:

0

result:

ok single line: '0'

Test #44:

score: 0
Accepted
time: 42ms
memory: 11880kb

input:

100000
()((()()))((()()(((()))()(()(((()()(())())(()(())()(()))))))(()())()()()(())(()()))))()(())((())()((((())(()())()())(())())))((())()()))(()())))))(())()()(()((()()())))())))()())()()())))(((()(((()()))))))((()(()())())))))(()(()))(()()()((()()()((())))((()())()(()(()())(((((())(()(()())(()(((...

output:

50046

result:

ok single line: '50046'

Test #45:

score: 0
Accepted
time: 36ms
memory: 11796kb

input:

100000
))(((()))((()()()()))))))()((())())()))())(()(()))()()(((()))))()(((()()))(()()())))((()())((((((((()(()())()))()(())(()))()(()()())()(()((()(()())())))())((()()))))))((((()(()())()(())((()()()()((()))())()(())(())(())(()((()()))(()((())((())))())(()))))((()))())()()()()))()()(()()()()))))())...

output:

49914

result:

ok single line: '49914'

Test #46:

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

input:

100000
))(()))(((((())())()()((()())))))(())(()))((())((())()))(()(()())(()))))()))()()))((()())())())()((((()))(()()((())()))())))()(((())())())))(()))()()))((()(()(())()))))(()()(())()(((()((())))(((())))))()(()()(())())(()())()))())(((()(((()((((((())))((())))))(()((())))((((())))))((()()()())))(...

output:

50031

result:

ok single line: '50031'

Test #47:

score: 0
Accepted
time: 42ms
memory: 11868kb

input:

100000
)()()))(()))(()()(()()(((((((()((()))()))((()(()())()(())(((()(()()(())))())()))(((())(((((((((((((()))(()()))))(()(((((()()(()))())((())())())(()((())()(()((((())((()(((((()))))((())(())(()(()()(())())((()()(()))((()))))))))((((())()))())(((())()()(((()(())())())))((())))))()))()))((()))(())...

output:

49844

result:

ok single line: '49844'

Test #48:

score: 0
Accepted
time: 39ms
memory: 11812kb

input:

100000
)))()))(()))()))((()((())(()()))))(()(())))))()((()(()(()(()(())(((()((((())(((()(((())())(()(())(()((()()(())())(())(()(())(((())()())())())))))()(())()(()((())()(())()))(((()())()((()()))((()())))())()()(()())))())()()())((((())()())(()()))())())())(())()((()((()))()))()(())()))(()))))()(()...

output:

49986

result:

ok single line: '49986'

Test #49:

score: 0
Accepted
time: 84ms
memory: 8192kb

input:

57169
))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))...

output:

0

result:

ok single line: '0'

Test #50:

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

input:

16876
())))))))())))))))))))))))))))))))))())))))))()))))))))))))()))))))))())))))))))()))))))))))))))))))))))))))))))))))))))))))))))))))())))))))))))())))()))))))))))))))))))))))()))))))))))))))())))()))))(())))))))()())())))))))))))))))))))))()))((()))))(())())))))))()))))))())())))))()))))))))))...

output:

5090

result:

ok single line: '5090'

Test #51:

score: 0
Accepted
time: 42ms
memory: 6012kb

input:

29919
())())))())()))))))))))(())())()()())()()))))))))))))))))(()))))))())))()))))))))())())())))))))))))()))))())()(())((())))))(())))))))()()))))))))()))))))())(()))(())))))(()))()))))))))))())()()))))()))))))()()()))())()))())()()))))()))((())()))))())))())))()()))))))(())))(())))())))))(())))))...

output:

68453

result:

ok single line: '68453'

Test #52:

score: 0
Accepted
time: 122ms
memory: 9220kb

input:

66512
)(())))(())())))))))))())))))))())(()()))())()())))()))))())))()))))())()))))(()(()()))(())))))))())))))))))((())))()))))()))()))()))()()))())))))(()))()()()()))))))))())))(()))(()))))(()))))((()))((((()())))(())(()))))())))()((()()()))()))())))))())(())(()())))))))()())))(((())))()))())))(())...

output:

1528331

result:

ok single line: '1528331'

Test #53:

score: 0
Accepted
time: 149ms
memory: 9576kb

input:

72163
()(())))(((()(()))))())))()))(()())))))))())())()()))()))()))()()))(()))(()((())(()((()))()())()))))()()()()((())))()((()))()))))(())()(())))))()()))(()()))()))))))))())())(()(()))))())))())()))()()))((()()))))())())(((()(()))(((((()))))()))(()()))(())((()(((()))(()))()))))))))()())()(()()))))...

output:

17130357

result:

ok single line: '17130357'

Test #54:

score: 0
Accepted
time: 64ms
memory: 6152kb

input:

34189
())()))))(((()()(((())()()())())((()())()()()))((()))()))(())((((()(())))())())))())(())((()))((()))(((())(()))(()))(()))((())))))(()(()((((((()()(()((()(((((()((())()(((()(((())(((())((()))))(())((((((())(((((((())()))))))()(())())()(())(()(()()))()()))())())()((())((((()))()))()))()()((()(((...

output:

6079783

result:

ok single line: '6079783'

Test #55:

score: 0
Accepted
time: 188ms
memory: 10636kb

input:

87137
((())))((((((()(((())(()()))(((()())(((((()(())((())(((()()))((((((())())())(())(())))()((()((((()()((()())()))()(()())))(()()(((()())))((((())))()))(()())())(()(()(()(()())(((()()()(((()(()())()()()(()(())))((((()(()((()(()(((()((((()))))))((())(()(())())))(((()((()()(())())()(()(((((())()(()...

output:

30343042

result:

ok single line: '30343042'

Test #56:

score: 0
Accepted
time: 197ms
memory: 10916kb

input:

96188
()(()((())()()((((((()))(()()()((()((((((((((()(((((()(((()())(()(()(()((((()()(((()(((())))((()()()(())))(((((((((()(()((()(((((((((()(()(()((((()))()(()))()(((())(()((((((()))))((((()(()(()(((((()()()))(((((((((((()(((()(((()()))(((((()(()(())(((((())(((()(((((()(((((())((((((((())(()))(((((...

output:

1769546

result:

ok single line: '1769546'

Test #57:

score: 0
Accepted
time: 48ms
memory: 5740kb

input:

30179
(((((((())((((()(()))((()(((()(()))(()(()()((((((((())((((((((((((()(((())()(((((((((((()((((((((((((()(((((((((((()()((((()(((())(()((()(()(((((()(()(((((((())(()())(((((((((((()(()((((((((((()))()((()((((((((((((((((()())(((((()(()((((((()((((((((())((((((()(((((((((((((((((((((((())(((()(()...

output:

61248

result:

ok single line: '61248'

Test #58:

score: 0
Accepted
time: 95ms
memory: 7920kb

input:

57478
(()((((()()()(()((((((((((((((((((((((()(()((((((((((((((((((((((((((((((((((((((()((()((((((((((((((()((((()(((())()(((())(((((((((((((()((((((((((((()(()((((((((((((((()(((((((((((((((((()((((((((((((()(()((((((((((((((((((((((()((((()((((((((((((((((()(((((((())((((((((((((((((()(((((((((((...

output:

18474

result:

ok single line: '18474'

Test #59:

score: 0
Accepted
time: 111ms
memory: 9012kb

input:

69944
((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((...

output:

0

result:

ok single line: '0'

Test #60:

score: 0
Accepted
time: 226ms
memory: 11788kb

input:

100000
)()()())()(()())()(((((()()()))((()()))(()(()()))))(()))()(()()())()))))()))(())))())(()))())()()(()())((())(()((((())(()())()()()()(()((()(((())())(()())))))())))())())()())()()))((()()(((((()()(((())(()(((()())(((((((((()))()))(()()))((()(()())(())))))))((((())()(((()()(()))(()((()(((()()))...

output:

38330131

result:

ok single line: '38330131'

Test #61:

score: 0
Accepted
time: 222ms
memory: 11816kb

input:

100000
)(()(()(())((())(((((())()()))))())())()((())()()))(()))))))(()(((()())()()(()()))))())(()()))()((((())((())))()()()))((())))))(()((()))))))())))()(())(()((()))()))()((()())))())(()())())(()())())())))(()))(()()()(()(()))()()(((())()((()((())))))(())(()())((((())))()((()(())(((()()()()(()()))...

output:

54603714

result:

ok single line: '54603714'

Test #62:

score: 0
Accepted
time: 215ms
memory: 11876kb

input:

100000
(())()))(())()()))(((())))(()(()))(()())()()))))()(()(()()(()((()()()()((()))(((((((())()((()(()(()))))(((()(((((()(((()))())(()(((())(())((()))()(()))()(()()))((((()()((((()))))()))))((()))))(()(()(()(())(((())(((()()))())()(()()((()(())()))((()()()()))()()(()(())()((()())((((((())())))(()((...

output:

41579487

result:

ok single line: '41579487'

Test #63:

score: 0
Accepted
time: 223ms
memory: 11648kb

input:

100000
)(()((()))()(())(()(())((()(()())(((()(((())))))(()))))()()()))(((((((()(())(())))()))((()())((()()())())))(((((((())((())())(()()))))(()))((())))(())))())((()(()((())(())))()(()()()()((())()))))((()((()((())()(((()))))(()()())(()((((()))(((()()()))(()())()(())(()))))))())((((()((((()((())())...

output:

49681589

result:

ok single line: '49681589'

Test #64:

score: 0
Accepted
time: 222ms
memory: 11792kb

input:

100000
)())))()()(())()((())))())(((())()(()))))()()((()))())))((()))(((((()((()((((()())()())((((()))()()()))))()()())())())))()(()))()()(((())))((())()())(()()(())))())))()))((()()))(()())())()((((()((())(())))(()))((()()())(())()))()(()()))(()())))(()()(((((())()(((()(())))))(((()))))))()))(((())...

output:

48162246

result:

ok single line: '48162246'

Test #65:

score: 0
Accepted
time: 0ms
memory: 3608kb

input:

7
((())))
1 2
1 3
1 4
4 5
1 6
6 7

output:

6

result:

ok single line: '6'

Test #66:

score: 0
Accepted
time: 121ms
memory: 19220kb

input:

100000
()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()(...

output:

2500000000

result:

ok single line: '2500000000'

Extra Test:

score: 0
Extra Test Passed