Anton and School - 2 CodeForces - 785D (组合计数,括号匹配)

大意: 给定括号字符串, 求多少个子串括号是RSGS. RSGS定义如下:

  • It is not empty (that is n ≠ 0). 
  • The length of the sequence is even. 
  • First  charactes of the sequence are equal to "(". 
  • Last  charactes of the sequence are equal to ")". 

猜你喜欢

转载自www.cnblogs.com/uid001/p/10424026.html