結果
問題 | No.154 市バス |
ユーザー | matrie |
提出日時 | 2021-01-04 21:56:04 |
言語 | Python3 (3.12.2 + numpy 1.26.4 + scipy 1.12.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 316 bytes |
コンパイル時間 | 352 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 17,824 KB |
最終ジャッジ日時 | 2024-04-23 07:01:46 |
合計ジャッジ時間 | 17,171 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | TLE | - |
testcase_01 | TLE | - |
testcase_02 | TLE | - |
testcase_03 | AC | 1,934 ms
10,752 KB |
testcase_04 | TLE | - |
testcase_05 | AC | 30 ms
10,752 KB |
testcase_06 | AC | 33 ms
10,752 KB |
testcase_07 | TLE | - |
testcase_08 | -- | - |
ソースコード
n=int(input()) a,r,g,w="impossible",'R','G','W' for i in range(n): l=[] c=0 for x in input()[::-1]: if x==r: l.append(1) elif x==g and 1 in l: l[l.index(1)]=2 elif x==w and 2 in l: l[l.index(2)]=3 elif x==w and 3 in l: continue else: c=1; break if len(l)<1: c=1 elif min(l)<3: c=1 print(a[(c<1)*2:])