結果
問題 |
No.154 市バス
|
ユーザー |
![]() |
提出日時 | 2021-02-09 20:27:15 |
言語 | PyPy3 (7.3.15) |
結果 |
MLE
|
実行時間 | - |
コード長 | 430 bytes |
コンパイル時間 | 131 ms |
コンパイル使用メモリ | 82,344 KB |
実行使用メモリ | 76,496 KB |
最終ジャッジ日時 | 2024-07-07 02:33:06 |
合計ジャッジ時間 | 1,488 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 1 |
other | WA * 2 MLE * 6 |
ソースコード
import sys input = sys.stdin.readline sys.setrecursionlimit(10 ** 7) def main(): S = input().rstrip() G = 0 for s in S: if s == "G": G += 1 elif s == "R": if not G: print("impossible") return G -= 1 if G: print("impossible") else: print("possible") return T = int(input()) for _ in range(T): main()