結果
| 問題 | No.154 市バス |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-05-20 23:10:49 |
| 言語 | Python3 (3.14.3 + numpy 2.4.4 + scipy 1.17.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 394 bytes |
| 記録 | |
| コンパイル時間 | 613 ms |
| コンパイル使用メモリ | 20,576 KB |
| 実行使用メモリ | 15,360 KB |
| 最終ジャッジ日時 | 2026-04-08 21:01:14 |
| 合計ジャッジ時間 | 3,360 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 1 |
| other | AC * 5 WA * 3 |
ソースコード
T = int(input())
tt=[]
for _ in range(T):
tt.append(input())
for t in tt:
#print(len(t))
count=0
for i in t:
if i=="G":
count+=1
elif i=="R":
count-=1
if count<0:
count=-10**5
continue
#print(count)
#print(count)
if count!=0:
print("impossible")
else:
print("possible")