INOI1602 Brackets

statement

#1

As the statement did not state very clear, I would like to ask if a subseqeunce can be empty? (Not choosing any pairs at all)

Also what is the answer if there is no valid subseqeunces at all?


#2

This is the problem https://www.codechef.com/IOIPRAC/problems/INOI1602

  1. Yes, a sub-sequence may be empty.
  2. There may be no valid sub-sequence at all.

In both the cases, the answer should be 0.


#3

A Link to Q will be appreciated ^^