Skip to content

Instantly share code, notes, and snippets.

@fffprograming
Last active August 29, 2015 14:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fffprograming/11111329 to your computer and use it in GitHub Desktop.
Save fffprograming/11111329 to your computer and use it in GitHub Desktop.
(define limit (read))
(define (read-input-list n)
(if (= n 0) '() (cons (read) (read-input-list (- n 1)))))
(define takonum (read))
(define takolist (read-input-list takonum))
(define kyakunum (read))
(define kyakulist (read-input-list kyakunum))
(define (answer lista listb limitnum) (cond ((null? listb) "yes")
((null? lista) "no")
((<= 0 (- (car listb) (car lista)) limitnum) (answer (cdr lista) (cdr listb) limitnum))
(else (answer (cdr lista) listb limitnum))))
(display (answer takolist kyakulist limit))
(newline)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment