Syntax Included
Time limit1sMemory limit128 MB
Parse each HTML-like string against the given grammar and decide whether it is syntactically valid.
- Level
Medium7 of 10
- Topics
- String, Recursion, Implementation, Brute force
- Solved
- No attempts yet
Problem
You are building your first website and keep making simple HTML syntax mistakes. To catch them, you decide to write an HTML parser that determines whether your HTML code is syntactically correct, based on the following condensed HTML definition:
Input
The first line contains a single integer , the number of data sets.
Each of the following lines contains one data set of up to 1000 characters. Spaces may appear anywhere within a data set.
All tags are case sensitive.
Output
For each data set, print one line.
If the code is syntactically correct, print:
Syntax Included
Otherwise, print:
No Syntax Included