Hi there, fellow Lisp programmer,

I didn't participate last year and I'm not sure how good the support of 
"exotic" languages is now that the code has to run on their servers.

The solution below to the second problem seems fine to me, and it works for the 
test sets one and two. However, it results in a Runtime Error for test set 
three and I have no idea why that may be.

I would be interested in knowing if other people has also experienced issues 
with SBCL.

Cheers,

Carlos

(defun solve (n path)
  (declare (ignore n))
  (coerce (loop for m across path
                collect (ecase m
                          (#\S #\E)
                          (#\E #\S)))
          'string))

(defun run (&optional (input-stream t) (output-stream t))
  (let ((cases (parse-integer (read-line input-stream))))
    (loop for case from 1 to cases
          for n = (read input-stream)
          for path = (read-line input-stream)
          do (format output-stream "Case #~A: ~A~&" case (solve n path)))))

(run)

-- 
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/d104a8d6-513c-4f0d-9ff1-bf3f826bbce1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to