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