結果

問題 No.11 カードマッチ
ユーザー MiyamonYMiyamonY
提出日時 2019-09-04 17:34:12
言語 Scheme
(Gauche-0.9.13)
結果
AC  
実行時間 19 ms / 5,000 ms
コード長 638 bytes
コンパイル時間 129 ms
コンパイル使用メモリ 5,296 KB
実行使用メモリ 13,976 KB
最終ジャッジ日時 2023-08-28 08:50:11
合計ジャッジ時間 1,913 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 18 ms
11,900 KB
testcase_01 AC 18 ms
11,700 KB
testcase_02 AC 18 ms
11,796 KB
testcase_03 AC 18 ms
11,696 KB
testcase_04 AC 18 ms
11,924 KB
testcase_05 AC 19 ms
11,776 KB
testcase_06 AC 19 ms
13,976 KB
testcase_07 AC 19 ms
11,768 KB
testcase_08 AC 18 ms
11,960 KB
testcase_09 AC 19 ms
11,788 KB
testcase_10 AC 19 ms
11,920 KB
testcase_11 AC 19 ms
11,776 KB
testcase_12 AC 18 ms
11,764 KB
testcase_13 AC 19 ms
11,760 KB
testcase_14 AC 19 ms
11,740 KB
testcase_15 AC 18 ms
11,864 KB
testcase_16 AC 19 ms
11,976 KB
testcase_17 AC 18 ms
11,776 KB
testcase_18 AC 19 ms
11,976 KB
権限があれば一括ダウンロードができます

ソースコード

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