結果
| 問題 | No.154 市バス |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-05-16 16:06:11 |
| 言語 | PyPy3 (7.3.23 + ACL) |
| 結果 |
MLE
不安定
|
| 実行時間 | - |
| コード長 | 371 bytes |
| 記録 | |
| コンパイル時間 | 65 ms |
| コンパイル使用メモリ | 81,184 KB |
| 実行使用メモリ | 83,748 KB |
| 最終ジャッジ日時 | 2026-09-28 05:03:33 |
| 合計ジャッジ時間 | 2,009 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 1 |
| other | AC * 2 MLE * 6 |
ソースコード
for _ in range(int(input())):
s=list(input())
s.reverse()
a,b=0,0;d=1
for i in s:
if i=="R":
a+=1
elif i=="G":
b+=1
if a<b:
d=0;break
else:
if not a or not b:
d=0;break
if a!=b:
d=0
print("possible" if d else "impossible")