結果
問題 | No.154 市バス |
ユーザー |
|
提出日時 | 2021-01-04 22:00:41 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
TLE
|
実行時間 | - |
コード長 | 315 bytes |
コンパイル時間 | 186 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 16,128 KB |
最終ジャッジ日時 | 2024-10-15 06:57:03 |
合計ジャッジ時間 | 16,390 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | -- * 1 |
other | AC * 3 TLE * 5 |
ソースコード
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==w and 2 in l: l[l.index(2)]=3 elif x==w and 3 in l: continue elif x==g and 1 in l: l[l.index(1)]=2 elif x==r: l.append(1) else: c=1; break if len(l)<1: c=1 elif min(l)<3: c=1 print(a[(c<1)*2:])