結果

問題 No.154 市バス
ユーザー matriematrie
提出日時 2021-01-04 21:07:40
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 159 bytes
コンパイル時間 160 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 10,880 KB
最終ジャッジ日時 2024-10-15 06:12:45
合計ジャッジ時間 1,753 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample WA * 1
other AC * 5 WA * 3
権限があれば一括ダウンロードができます

ソースコード

diff #

n=int(input())
a="impossible"
for i in range(n):
	s=input().replace('W','')
	c=0
	for x in s:
		if x=='G':c+=1
		else:c-=1
		if c<0: break
	print(a[(c==0)*2:])
0