Your task is to count the parentheses this way:(()))())())(
(())
and()()
both result in a total of 0
(((
and(()(()(
both result in a total of 3
))(((((
also results in a total of 3
())
and))(
both result in a total of -1
)))
and)())())
both result in a total of -3
VP 53.1: Checksum (15 pts)
Use this data:https://samsclass.info/COMSC122/proj/VP53What is the count of parentheses for that data?That number is the flag.
VP 53.2: Running Total (15 pts)
Use the same data:https://samsclass.info/COMSC122/proj/VP53Now, given the same instructions, find the position of the first character
that causes the running total to first reach -1.The first character in the instructions has position 1, the second character
has position 2, and so on.For example:
What is the position that causes the total to reach -1?)
reaches -1 at position 1
()())
reaches -1 at position 5That number is the flag.
Posted 9-3-25