Last active
July 28, 2017 12:43
-
-
Save jeremiahbiard/c33d408cefa599907b27256757b40c63 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun comp (a b) | |
(cond ((< a b) 'bob) | |
((> a b) 'alice))) | |
(defvar a (with-input-from-string (in (read-line)) | |
(loop for x = (read in nil nil) while x collect x))) | |
(defvar b (with-input-from-string (in (read-line)) | |
(loop for x = (read in nil nil) while x collect x))) | |
(defvar r (mapcar #'comp a b)) | |
(defvar alice 0) | |
(defvar bob 0) | |
(mapcar #'(lambda (x) | |
(cond ((equal x 'alice) (incf alice)) | |
((equal x 'bob) (incf bob))) | |
) r) | |
(format t "~S ~S" alice bob) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment