結果
| 問題 | No.154 市バス |
| コンテスト | |
| ユーザー |
👑 Kazun
|
| 提出日時 | 2021-02-12 02:06:37 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
MLE
|
| 実行時間 | - |
| コード長 | 316 bytes |
| 記録 | |
| コンパイル時間 | 168 ms |
| コンパイル使用メモリ | 85,832 KB |
| 実行使用メモリ | 139,624 KB |
| 最終ジャッジ日時 | 2026-04-02 04:56:12 |
| 合計ジャッジ時間 | 1,387 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | MLE * 1 |
| other | WA * 2 MLE * 6 |
ソースコード
import sys
input=sys.stdin.readline
T=int(input())
for _ in range(T):
S=input()[:-1]
X=0
F=1
for s in S:
if s=="G":
X+=1
elif s=="R":
if X==0:
F=0
else:
X-=1
print("possible" if X==0 and F==1 else "impossible")
Kazun