結果

問題 No.11 カードマッチ
ユーザー MiyamonY
提出日時 2019-09-04 17:34:12
言語 Scheme
(Gauche-0.9.15)
結果
AC  
実行時間 25 ms / 5,000 ms
コード長 638 bytes
コンパイル時間 208 ms
コンパイル使用メモリ 6,948 KB
実行使用メモリ 16,128 KB
最終ジャッジ日時 2024-12-29 04:31:08
合計ジャッジ時間 1,998 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 19
権限があれば一括ダウンロードができます

ソースコード

diff #

(define (read-number)
  (string->number (read-line)))

(let ((w (read-number))
      (h (read-number))
      (n (read-number)))

  (let-values (((marks nums)
		(let loop ((in (read-line))
  	       		   (marks '())
  	       		   (nums '()))
  	       	  (cond ((eof-object? in)
  	       		 (values (length (delete-duplicates marks))
  	       			 (length (delete-duplicates nums))))
  	       		(else
  	       		 (let* ((in (open-input-string in))
  	       			(s (read in))
  	       			(k (read in)))
  	       		   (loop (read-line) (cons s marks) (cons k nums))))))))

    (print (- (+ (* marks h) (* nums w)) (* marks nums) n))))
0