結果
問題 | No.154 市バス |
ユーザー | pekempey |
提出日時 | 2015-10-11 20:17:31 |
言語 | PyPy2 (7.3.15) |
結果 |
MLE
|
実行時間 | - |
コード長 | 260 bytes |
コンパイル時間 | 706 ms |
コンパイル使用メモリ | 76,800 KB |
実行使用メモリ | 77,952 KB |
最終ジャッジ日時 | 2024-04-21 08:49:43 |
合計ジャッジ時間 | 2,275 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | MLE | - |
testcase_01 | MLE | - |
testcase_02 | MLE | - |
testcase_03 | MLE | - |
testcase_04 | MLE | - |
testcase_05 | MLE | - |
testcase_06 | MLE | - |
testcase_07 | MLE | - |
testcase_08 | MLE | - |
ソースコード
def check(S): depth = 0 for c in S: if c == 'G': depth += 1 elif c == 'R': depth -= 1 if depth < 0: return False return depth == 0 T = input() for i in xrange(T): S = raw_input() if check(S): print 'possible' else: print 'impossible'