QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#677287#126. Balanced StringsyellowbirdAC ✓239ms23160kbC++205.3kb2024-10-26 10:58:012024-10-26 10:58:01

詳細信息

Test #1:

score: 100
Accepted
time: 39ms
memory: 6448kb

input:

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

output:

0

result:

ok single line: '0'

Test #2:

score: 0
Accepted
time: 56ms
memory: 7632kb

input:

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

output:

23079

result:

ok single line: '23079'

Test #3:

score: 0
Accepted
time: 59ms
memory: 8244kb

input:

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

output:

994794

result:

ok single line: '994794'

Test #4:

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

input:

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

output:

15650664

result:

ok single line: '15650664'

Test #5:

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

input:

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

output:

5339607

result:

ok single line: '5339607'

Test #6:

score: 0
Accepted
time: 69ms
memory: 8880kb

input:

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

output:

49390858

result:

ok single line: '49390858'

Test #7:

score: 0
Accepted
time: 20ms
memory: 5556kb

input:

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

output:

2884692

result:

ok single line: '2884692'

Test #8:

score: 0
Accepted
time: 45ms
memory: 7272kb

input:

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

output:

8601971

result:

ok single line: '8601971'

Test #9:

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

input:

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

output:

192545

result:

ok single line: '192545'

Test #10:

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

input:

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

output:

53225

result:

ok single line: '53225'

Test #11:

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

input:

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

output:

0

result:

ok single line: '0'

Test #12:

score: 0
Accepted
time: 112ms
memory: 11696kb

input:

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

output:

86558204

result:

ok single line: '86558204'

Test #13:

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

input:

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

output:

85291914

result:

ok single line: '85291914'

Test #14:

score: 0
Accepted
time: 115ms
memory: 11820kb

input:

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

output:

81274356

result:

ok single line: '81274356'

Test #15:

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

input:

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

output:

95427650

result:

ok single line: '95427650'

Test #16:

score: 0
Accepted
time: 104ms
memory: 11516kb

input:

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

output:

84225313

result:

ok single line: '84225313'

Test #17:

score: 0
Accepted
time: 230ms
memory: 22724kb

input:

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

output:

0

result:

ok single line: '0'

Test #18:

score: 0
Accepted
time: 239ms
memory: 22400kb

input:

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

output:

16424

result:

ok single line: '16424'

Test #19:

score: 0
Accepted
time: 116ms
memory: 13868kb

input:

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

output:

21924

result:

ok single line: '21924'

Test #20:

score: 0
Accepted
time: 140ms
memory: 14408kb

input:

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

output:

47224

result:

ok single line: '47224'

Test #21:

score: 0
Accepted
time: 56ms
memory: 8688kb

input:

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

output:

37491

result:

ok single line: '37491'

Test #22:

score: 0
Accepted
time: 206ms
memory: 17396kb

input:

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

output:

199386

result:

ok single line: '199386'

Test #23:

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

input:

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

output:

81154

result:

ok single line: '81154'

Test #24:

score: 0
Accepted
time: 195ms
memory: 17208kb

input:

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

output:

84235

result:

ok single line: '84235'

Test #25:

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

input:

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

output:

9687

result:

ok single line: '9687'

Test #26:

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

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: 80ms
memory: 10476kb

input:

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

output:

0

result:

ok single line: '0'

Test #28:

score: 0
Accepted
time: 214ms
memory: 17424kb

input:

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

output:

198658

result:

ok single line: '198658'

Test #29:

score: 0
Accepted
time: 212ms
memory: 17592kb

input:

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

output:

198838

result:

ok single line: '198838'

Test #30:

score: 0
Accepted
time: 214ms
memory: 19324kb

input:

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

output:

199464

result:

ok single line: '199464'

Test #31:

score: 0
Accepted
time: 212ms
memory: 17416kb

input:

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

output:

197737

result:

ok single line: '197737'

Test #32:

score: 0
Accepted
time: 214ms
memory: 18500kb

input:

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

output:

197044

result:

ok single line: '197044'

Test #33:

score: 0
Accepted
time: 24ms
memory: 23160kb

input:

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

output:

0

result:

ok single line: '0'

Test #34:

score: 0
Accepted
time: 19ms
memory: 17532kb

input:

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

output:

6788

result:

ok single line: '6788'

Test #35:

score: 0
Accepted
time: 25ms
memory: 17012kb

input:

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

output:

13562

result:

ok single line: '13562'

Test #36:

score: 0
Accepted
time: 13ms
memory: 14564kb

input:

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

output:

17283

result:

ok single line: '17283'

Test #37:

score: 0
Accepted
time: 15ms
memory: 12356kb

input:

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

output:

28671

result:

ok single line: '28671'

Test #38:

score: 0
Accepted
time: 13ms
memory: 12740kb

input:

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

output:

25300

result:

ok single line: '25300'

Test #39:

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

input:

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

output:

9600

result:

ok single line: '9600'

Test #40:

score: 0
Accepted
time: 7ms
memory: 9140kb

input:

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

output:

9997

result:

ok single line: '9997'

Test #41:

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

input:

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

output:

2210

result:

ok single line: '2210'

Test #42:

score: 0
Accepted
time: 22ms
memory: 17228kb

input:

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

output:

8273

result:

ok single line: '8273'

Test #43:

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

input:

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

output:

0

result:

ok single line: '0'

Test #44:

score: 0
Accepted
time: 26ms
memory: 22052kb

input:

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

output:

50046

result:

ok single line: '50046'

Test #45:

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

input:

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

output:

49914

result:

ok single line: '49914'

Test #46:

score: 0
Accepted
time: 26ms
memory: 22068kb

input:

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

output:

50031

result:

ok single line: '50031'

Test #47:

score: 0
Accepted
time: 35ms
memory: 22200kb

input:

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

output:

49844

result:

ok single line: '49844'

Test #48:

score: 0
Accepted
time: 27ms
memory: 21980kb

input:

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

output:

49986

result:

ok single line: '49986'

Test #49:

score: 0
Accepted
time: 56ms
memory: 7992kb

input:

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

output:

0

result:

ok single line: '0'

Test #50:

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

input:

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

output:

5090

result:

ok single line: '5090'

Test #51:

score: 0
Accepted
time: 32ms
memory: 5928kb

input:

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

output:

68453

result:

ok single line: '68453'

Test #52:

score: 0
Accepted
time: 79ms
memory: 8712kb

input:

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

output:

1528331

result:

ok single line: '1528331'

Test #53:

score: 0
Accepted
time: 86ms
memory: 9316kb

input:

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

output:

17130357

result:

ok single line: '17130357'

Test #54:

score: 0
Accepted
time: 38ms
memory: 6344kb

input:

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

output:

6079783

result:

ok single line: '6079783'

Test #55:

score: 0
Accepted
time: 97ms
memory: 10176kb

input:

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

output:

30343042

result:

ok single line: '30343042'

Test #56:

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

input:

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

output:

1769546

result:

ok single line: '1769546'

Test #57:

score: 0
Accepted
time: 27ms
memory: 5860kb

input:

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

output:

61248

result:

ok single line: '61248'

Test #58:

score: 0
Accepted
time: 53ms
memory: 7984kb

input:

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

output:

18474

result:

ok single line: '18474'

Test #59:

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

input:

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

output:

0

result:

ok single line: '0'

Test #60:

score: 0
Accepted
time: 129ms
memory: 11472kb

input:

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

output:

38330131

result:

ok single line: '38330131'

Test #61:

score: 0
Accepted
time: 129ms
memory: 11384kb

input:

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

output:

54603714

result:

ok single line: '54603714'

Test #62:

score: 0
Accepted
time: 129ms
memory: 11340kb

input:

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

output:

41579487

result:

ok single line: '41579487'

Test #63:

score: 0
Accepted
time: 126ms
memory: 11400kb

input:

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

output:

49681589

result:

ok single line: '49681589'

Test #64:

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

input:

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

output:

48162246

result:

ok single line: '48162246'

Test #65:

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

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: 81ms
memory: 19620kb

input:

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

output:

2500000000

result:

ok single line: '2500000000'

Extra Test:

score: 0
Extra Test Passed