Problem
Input format
The program reads from standard input a single string on one line. - the string has at most `2000` characters; - characters that are not brackets are ignored during the check; - a string with no brackets at all is considered balanced.
Output format
The program prints to standard output the word `DA` or `NU`, followed by a newline.
Example
(a+[b-{c*d}])
DA
Stuck?
Use the Get Hint button in the action bar to reveal a guided hint.
💬 Discussion
Loading...No comments yet. Be the first to start the discussion!
Sample cases (from the problem)
Sample Case 1
(a+[b-{c*d}])
DA
Solve it your way first
Community solutions unlock after you submit a passing solution. Don't peek.
Ready to solve this challenge?
Create a free account to write code, submit solutions, and track your progress.