結果
| 問題 | No.154 市バス |
| コンテスト | |
| ユーザー |
JunOnuma
|
| 提出日時 | 2017-05-18 19:03:04 |
| 言語 | PyPy2 (7.3.20) |
| 結果 |
MLE
|
| 実行時間 | - |
| コード長 | 374 bytes |
| 記録 | |
| コンパイル時間 | 66 ms |
| コンパイル使用メモリ | 81,152 KB |
| 実行使用メモリ | 83,840 KB |
| 最終ジャッジ日時 | 2026-07-18 13:33:26 |
| 合計ジャッジ時間 | 2,333 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | MLE * 1 |
| other | MLE * 8 |
ソースコード
t = int(raw_input())
for _ in range(t):
s = raw_input()
ans = True
cnt = 0
for c in s:
if c == 'G':
cnt += 1
elif c == 'R':
cnt -= 1
if cnt < 0:
ans = False
break
if cnt != 0:
ans = False
if ans:
print 'possible'
else:
print 'impossible'
JunOnuma