Language: C++

(eval-when (:compile-toplevel :load-toplevel :execute)
  (defparameter OPT
    #+swank '(optimize (speed 3) (safety 2))
    #-swank '(optimize (speed 3) (safety 0) (debug 0)))
  #+swank (progn (ql:quickload '(:cl-debug-print :fiveam))
                 (shadow :run)
                 (use-package :fiveam)))
#+swank (cl-syntax:use-syntax cl-debug-print:debug-print-syntax)

;; BEGIN_INSERTED_CONTENTS
(defmacro split-ints-and-bind (vars string &body body)
  (let ((pos1 (gensym "POS"))
	(pos2 (gensym "POS"))
	(str (gensym "STR")))
    (labels ((expand (vars &optional (init-pos1 t))
	       (if (null vars)
		   body
		   `((let* ((,pos1 ,(if init-pos1 0 `(1+ ,pos2)))
			    (,pos2 (position #\space ,str :start ,pos1 :test #'char=))
			    (,(car vars) (parse-integer ,str :start ,pos1 :end ,pos2)))
		       ,@(expand (cdr vars) nil))))))
      `(let ((,str ,string))
         (declare (string ,str))
	 ,@(expand vars)))))

(defmacro define-int-types (&rest bits)
  `(progn
     ,@(mapcar (lambda (b) `(deftype ,(intern (format nil "UINT~A" b)) () '(unsigned-byte ,b))) bits)
     ,@(mapcar (lambda (b) `(deftype ,(intern (format nil "INT~A" b)) () '(signed-byte ,b))) bits)))
(define-int-types 2 4 7 8 15 16 31 32 62 63 64)

(defmacro println (obj &optional (stream '*standard-output*))
  `(let ((*read-default-float-format* 'double-float))
     (prog1 (princ ,obj ,stream) (terpri ,stream))))

;; Hauptteil

(defun main ()
  (let* ((n (read))
         (m (read))
         ;; (from to -cost)
         (edges (make-array m :element-type 'list))
         (dp (make-array n :element-type 'fixnum :initial-element most-positive-fixnum)))
    (setf (aref dp 0) 0)
    (dotimes (i m)
      (split-ints-and-bind (a b c) (read-line)
        (setf (aref edges i) (list (- a 1) (- b 1) (- c)))))
    (println
     (loop repeat n
           unless (loop for (src dest neg-cost) across edges
                        thereis (when (and (/= most-positive-fixnum (aref dp src))
                                           (< (+ (aref dp src) neg-cost)
                                              (aref dp dest)))
                                  (setf (aref dp dest) (+ (aref dp src) neg-cost))))
           do (return (- (aref dp (- n 1))))
           finally (return "inf")))))

#-swank(main)


Compiler output:
a.cc:3:6: error: invalid preprocessing directive #+
    3 |     #+swank '(optimize (speed 3) (safety 2))
      |      ^
a.cc:3:13: warning: missing terminating ' character
    3 |     #+swank '(optimize (speed 3) (safety 2))
      |             ^
a.cc:4:6: error: invalid preprocessing directive #-
    4 |     #-swank '(optimize (speed 3) (safety 0) (debug 0)))
      |      ^
a.cc:4:13: warning: missing terminating ' character
    4 |     #-swank '(optimize (speed 3) (safety 0) (debug 0)))
      |             ^
a.cc:5:4: error: invalid preprocessing directive #+
    5 |   #+swank (progn (ql:quickload '(:cl-debug-print :fiveam))
      |    ^
a.cc:5:32: warning: missing terminating ' character
    5 |   #+swank (progn (ql:quickload '(:cl-debug-print :fiveam))
      |                                ^
a.cc:8:2: error: invalid preprocessing directive #+
    8 | #+swank (cl-syntax:use-syntax cl-debug-print:debug-print-syntax)
      |  ^
a.cc:18:20: error: stray '`' in program
   18 |                    `((let* ((,pos1 ,(if init-pos1 0 `(1+ ,pos2)))
      |                    ^
a.cc:18:53: error: stray '`' in program
   18 |                    `((let* ((,pos1 ,(if init-pos1 0 `(1+ ,pos2)))
      |                                                     ^
a.cc:19:46: error: stray '#' in program
   19 |                             (,pos2 (position #\space ,str :start ,pos1 :test #'char=))
      |                                              ^
a.cc:19:47: error: stray '\' in program
   19 |                             (,pos2 (position #\space ,str :start ,pos1 :test #'char=))
      |                                               ^
a.cc:19:78: error: stray '#' in program
   19 |                             (,pos2 (position #\space ,str :start ,pos1 :test #'char=))
      |                                                                              ^
a.cc:19:79: warning: missing terminating ' character
   19 |                             (,pos2 (position #\space ,str :start ,pos1 :test #'char=))
      |                                                                               ^
a.cc:19:79: error: missing terminating ' character
   19 |                             (,pos2 (position #\space ,str :start ,pos1 :test #'char=))
      |                                                                               ^~~~~~~~
a.cc:21:25: error: stray '@' in program
   21 |                        ,@(expand (cdr vars) nil))))))
      |                         ^
a.cc:22:7: error: stray '`' in program
   22 |       `(let ((,str ,string))
      |       ^
a.cc:24:11: error: stray '@' in program
   24 |          ,@(expand vars)))))
      |           ^
a.cc:27:3: error: stray '`' in program
   27 |   `(progn
      |   ^
a.cc:28:7: error: stray '@' in program
   28 |      ,@(mapcar (lambda (b) `(deftype ,(intern (format nil "UINT~A" b)) () '(unsigned-byte ,b))) bits)
      |       ^
a.cc:28:28: error: stray '`' in program
   28 |      ,@(mapcar (lambda (b) `(deftype ,(intern (format nil "UINT~A" b)) () '(unsigned-byte ,b))) bits)
      |                            ^
a.cc:28:75: warning: missing terminating ' character
   28 |      ,@(mapcar (lambda (b) `(deftype ,(intern (format nil "UINT~A" b)) () '(unsigned-byte ,b))) bits)
      |                                                                           ^
a.cc:28:75: error: missing terminating ' character
   28 |      ,@(mapcar (lambda (b) `(deftype ,(intern (format nil "UINT~A" b)) () '(unsigned-byte ,b))) bits)
      |                                                                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:29:7: error: stray '@' in program
   29 |      ,@(mapcar (lambda (b) `(deftype ,(intern (format nil "INT~A" b)) () '(signed-byte ,b))) bits)))
      |       ^
a.cc:29:28: error: stray '`' in program
   29 |      ,@(mapcar (lambda (b) `(deftype ,(intern (format nil "INT~A" b)) () '(signed-byte ,b))) bits)))
      |                            ^
a.cc:29:74: warning: missing terminating ' character
   29 |      ,@(mapcar (lambda (b) `(deftype ,(intern (format nil "INT~A" b)) () '(signed-byte ,b))) bits)))
      |                                                                          ^
a.cc:29:74: error: missing terminating ' character
   29 |      ,@(mapcar (lambda (b) `(deftype ,(intern (format nil "INT~A" b)) () '(signed-byte ,b))) bits)))
      |                                                                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:32:42: warning: missing terminating ' character
   32 | (defmacro println (obj &optional (stream '*standard-output*))
      |                                          ^
a.cc:32:42: error: missing terminating ' character
   32 | (defmacro println (obj &optional (stream '*standard-output*))
      |                                          ^~~~~~~~~~~~~~~~~~~~
a.cc:33:3: error: stray '`' in program
   33 |   `(let ((*read-default-float-format* 'double-float))
      |   ^
a.cc:33:39: warning: missing terminating ' character
   33 |   `(let ((*read-default-float-format* 'double-float))
      |                                       ^
a.cc:33:39: error: missing terminating ' character
   33 |   `(let ((*read-default-float-format* 'double-float))
      |                                       ^~~~~~~~~~~~~~~
a.cc:42:45: warning: missing terminating ' character
   42 |          (edges (make-array m :element-type 'list))
      |                                             ^
a.cc:42:45: error: missing terminating ' character
   42 |          (edges (make-array m :element-type 'list))
      |                                             ^~~~~~~
a.cc:43:42: warning: missing terminating ' character
   43 |          (dp (make-array n :element-type 'fixnum :initial-element most-positive-fixnum)))
      |                                          ^
a.cc:43:42: error: missing terminating ' character
   43 |          (dp (make-array n :element-type 'fixnum :initial-element most-positive-fixnum)))
      |                                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:58:2: error: invalid preprocessing directive #-
   58 | #-swank(main)
      |  ^
a.cc:1:6: error: expected ')' before '-' token
    1 | (eval-when (:compile-toplevel :load-toplevel :execute)
      | ~    ^
      |      )
a.cc:11:1: error: expected constructor, destructor, or type conversion before '(' token
   11 | (defmacro split-ints-and-bind (vars string &body body)
      | ^
a.cc:38:1: error: expected constructor, destructor, or type conversion before '(' token
   38 | (defun main ()
      | ^
a.cc:41:18: error: expected ')' before 'to'
   41 |          ;; (from to -cost)
      |             ~    ^~~
      |                  )