結果
問題 |
No.154 市バス
|
ユーザー |
|
提出日時 | 2024-12-29 13:42:35 |
言語 | PyPy3 (7.3.15) |
結果 |
MLE
|
実行時間 | - |
コード長 | 399 bytes |
コンパイル時間 | 256 ms |
コンパイル使用メモリ | 82,100 KB |
実行使用メモリ | 66,728 KB |
最終ジャッジ日時 | 2024-12-29 13:42:36 |
合計ジャッジ時間 | 1,617 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | MLE * 1 |
other | MLE * 8 |
ソースコード
from typing_extensions import Annotated T=int(input()) S=[list(input()) for _ in range(T)] for i in range(T): w=g=r=0 t=True for j in range(len(S[i])): if not w>=g>=r: print("imporssible") t=False break if S[i][j]=="W": w+=1 if S[i][j]=="G": g+=1 if S[i][j]=="R": r+=1 if g==r and t: print("possible") else: print("impossible")