結果
問題 | No.154 市バス |
ユーザー |
![]() |
提出日時 | 2023-03-05 23:04:12 |
言語 | PyPy3 (7.3.15) |
結果 |
MLE
|
実行時間 | - |
コード長 | 369 bytes |
コンパイル時間 | 127 ms |
コンパイル使用メモリ | 82,188 KB |
実行使用メモリ | 76,660 KB |
最終ジャッジ日時 | 2024-09-18 01:41:44 |
合計ジャッジ時間 | 1,743 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 1 |
other | WA * 2 MLE * 6 |
ソースコード
T = int(input())for _ in range(T):S = list(input())cnt = 0flag = 1for s in S:if s == "G":cnt += 1elif s == "R":cnt -= 1if cnt < 0:print("impossible")flag = 0breakif flag == 0:continueprint("possible") if cnt == 0 else print("impossible")