結果
問題 | No.154 市バス |
ユーザー | convexineq |
提出日時 | 2020-12-08 05:35:48 |
言語 | PyPy3 (7.3.15) |
結果 |
MLE
|
実行時間 | - |
コード長 | 364 bytes |
コンパイル時間 | 377 ms |
コンパイル使用メモリ | 81,788 KB |
実行使用メモリ | 76,060 KB |
最終ジャッジ日時 | 2023-10-17 16:56:54 |
合計ジャッジ時間 | 1,712 ms |
ジャッジサーバーID (参考情報) |
judge13 / judge11 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | MLE | - |
testcase_01 | MLE | - |
testcase_02 | MLE | - |
testcase_03 | MLE | - |
testcase_04 | MLE | - |
testcase_05 | WA | - |
testcase_06 | WA | - |
testcase_07 | MLE | - |
testcase_08 | WA | - |
ソースコード
t = int(input()) for _ in range(t): s = input() r = [0,0,0] ok = 1 for i in s: if i=="W": r[0] += 1 if i=="G": if r[1] >= r[0]: ok = 0 r[1] += 1 if i=="R": if r[2] >= r[1]: ok = 0 r[2] += 1 if r[1] != r[2]: ok = 0 print("possible " if ok else "impossible")