結果
問題 |
No.154 市バス
|
ユーザー |
![]() |
提出日時 | 2017-09-18 18:48:16 |
言語 | Nim (2.2.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 382 bytes |
コンパイル時間 | 3,068 ms |
コンパイル使用メモリ | 65,428 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-06-30 03:12:48 |
合計ジャッジ時間 | 3,866 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 1 |
other | AC * 6 WA * 2 |
コンパイルメッセージ
/home/judge/data/code/Main.nim(1, 8) Warning: imported and not used: 'sequtils' [UnusedImport]
ソースコード
import sequtils,strutils var N = stdin.readline.parseInt s : string for n in 0..<N: s = stdin.readline var w,g,r : int for c in s: if c == 'W': w += 1 if c == 'G': w = 0 g += 1 if c == 'R': g -= 1 if w == 0 and g == 0: echo "possible" else: echo "impossible"