結果
| 問題 |
No.342 一番ワロタww
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-01-18 14:38:38 |
| 言語 | Nim (2.2.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 5,000 ms |
| コード長 | 426 bytes |
| コンパイル時間 | 3,017 ms |
| コンパイル使用メモリ | 65,052 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-07-01 10:17:10 |
| 合計ジャッジ時間 | 3,813 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 14 |
ソースコード
import sequtils,unicode
let S = stdin.readLine()
var ans = newSeqWith(104,newSeq[string]())
var pre = ""
var wlen = 0
var preIsW = false
for s in S.utf8:
if s != "w":
if preIsW : pre = ""
pre &= s
wlen = 0
preIsW = false
continue
wlen += 1
if pre != "" : ans[wlen] &= pre
preIsW = true
for i in (ans.len-1).countdown(0):
if ans[i].len == 0 : continue
for s in ans[i]: echo s
quit(0)
echo ""