Verification of PDP
Very easy
Execution time limit is 1 second
Runtime memory usage limit is 64 megabytes
A sequence of round, square, and curly brackets is provided.
Your task is to determine if this sequence is a valid bracket sequence.
Input
The input file contains a bracket sequence with a maximum length of 10000 characters.
Output
Print YES if the bracket sequence is valid, and NO if it is not.
Examples
Input #2
Answer #2
Input #3
Answer #3
Submissions 2K
Acceptance rate 26%