In Contest Analysis for Distributed Round 2. for Problem C
seems like Pseudo code is wrong

Original
-----------
x = 0
for each character c in position i in the input:
  if c == '(':
    x = x + 1
  else
    x = x - 1
  if x < 0: return i
if x == 0:
  return the length of the input
else:
  return -1
------------

It should be
-------------
...
if x == 0:
  return -1
else:
  return the length of the input
-------------

-- 
You received this message because you are subscribed to the Google Groups 
"Google Code Jam" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-code/5c7e7d62-5b56-498d-84eb-34208957300b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to