結果
| 問題 |
No.342 一番ワロタww
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2018-08-13 21:37:34 |
| 言語 | Scheme (Gauche-0.9.15) |
| 結果 |
AC
|
| 実行時間 | 24 ms / 5,000 ms |
| コード長 | 675 bytes |
| コンパイル時間 | 79 ms |
| コンパイル使用メモリ | 5,248 KB |
| 実行使用メモリ | 16,000 KB |
| 最終ジャッジ日時 | 2024-10-15 13:38:38 |
| 合計ジャッジ時間 | 1,712 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 14 |
ソースコード
(define (main args)
(for-each print
(let loop [(str (read-line))
(mxl 0)
(ans '())]
(let [(mt (rxmatch #/([^w]+)(w+)/ str))]
(cond [mt (let [(mts (rxmatch-substring mt 1))
(mtl (string-length (rxmatch-substring mt 2)))]
(cond [(< mxl mtl) (loop (rxmatch-after mt) mtl (list mts))]
[(= mxl mtl) (loop (rxmatch-after mt) mxl (cons mts ans))]
[else (loop (rxmatch-after mt) mxl ans)]))]
[else (reverse ans)])
)))
0)