結果
問題 | No.893 お客様を誘導せよ |
ユーザー | ducktail |
提出日時 | 2019-10-10 14:14:42 |
言語 | Scheme (Gauche-0.9.14) |
結果 |
AC
|
実行時間 | 328 ms / 2,000 ms |
コード長 | 612 bytes |
コンパイル時間 | 113 ms |
コンパイル使用メモリ | 6,816 KB |
実行使用メモリ | 51,568 KB |
最終ジャッジ日時 | 2024-05-01 06:13:39 |
合計ジャッジ時間 | 2,587 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 24 ms
16,000 KB |
testcase_01 | AC | 23 ms
15,872 KB |
testcase_02 | AC | 66 ms
22,144 KB |
testcase_03 | AC | 201 ms
33,528 KB |
testcase_04 | AC | 204 ms
33,544 KB |
testcase_05 | AC | 174 ms
33,420 KB |
testcase_06 | AC | 117 ms
27,984 KB |
testcase_07 | AC | 22 ms
15,872 KB |
testcase_08 | AC | 328 ms
51,568 KB |
testcase_09 | AC | 25 ms
17,280 KB |
testcase_10 | AC | 23 ms
16,256 KB |
testcase_11 | AC | 23 ms
16,384 KB |
testcase_12 | AC | 32 ms
17,152 KB |
ソースコード
(define (read-list n) (cond [(zero? n) '()] [else (let1 x (read) (cons x (read-list (- n 1))))])) (define (read-list-list n) (cond [(zero? n) '()] [else (let1 m (read) (cons (read-list m) (read-list-list (- n 1))))])) (define (solve lx) (let loop ([lx lx]) (let1 ly (filter (^x (not (null? x))) lx) (cond [(null? ly) '()] [else (append (map car ly) (loop (map cdr ly)))])))) (define (main args) (let* ([n (read)] [ls (read-list-list n)]) (print (string-join (map number->string (solve ls)) " "))) 0)