結果
問題 | No.154 市バス |
ユーザー | convexineq |
提出日時 | 2020-12-08 05:37:19 |
言語 | PyPy3 (7.3.15) |
結果 |
MLE
|
実行時間 | - |
コード長 | 386 bytes |
コンパイル時間 | 155 ms |
コンパイル使用メモリ | 81,872 KB |
実行使用メモリ | 76,160 KB |
最終ジャッジ日時 | 2023-10-17 16:56:56 |
合計ジャッジ時間 | 1,545 ms |
ジャッジサーバーID (参考情報) |
judge11 / judge12 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
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()) r = [0,0,0] for _ in range(t): s = input() r[0] = r[1] = r[2] = 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")