Your output does not seem to be right.
Example:
()*()
this should give a negative result----- but your one doesn't;
the corresponding closing of the first should be the last.
Hope it helps.
Moderator: Board moderators

()*()
this should give a negative result----- but your one doesn't;
the corresponding closing of the first should be the last.
((**)()a+b)[(a){a+n}](*
((**)()a+b)[(a){a+n}](
And I'm not sure what this statement means?
"If the expression is not properly nested your program should determine the position of the offending bracket, that is the length of the shortest prefix of the expression that can not be extended to a properly nested expression."

How do you know these two inputs give two different outputs---
my AC program gives the same output..... very strange.
((**)()a+b)[(a){a+n}](NO 20NO 21((**)()a+b)[(a){a+n}](*
()()(a+b)(YES[**
((((())
(*(*(*(**)*)NO 2
NO 4
NO 3No 4
No 8
No 7No 3
No 4
No 8
No 7 (**
[**
((((())
(*(*(*(**)*)NO 2
NO 2
NO 4
NO 3Users browsing this forum: No registered users and 0 guests