結果
問題 | No.154 市バス |
ユーザー |
|
提出日時 | 2021-01-04 21:56:04 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
TLE
|
実行時間 | - |
コード長 | 316 bytes |
コンパイル時間 | 170 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 16,000 KB |
最終ジャッジ日時 | 2024-10-15 06:50:36 |
合計ジャッジ時間 | 16,458 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | |
other | AC * 3 TLE * 5 |
ソースコード
n=int(input())a,r,g,w="impossible",'R','G','W'for i in range(n):l=[]c=0for x in input()[::-1]:if x==r: l.append(1)elif x==g and 1 in l: l[l.index(1)]=2elif x==w and 2 in l: l[l.index(2)]=3elif x==w and 3 in l: continueelse: c=1; breakif len(l)<1: c=1elif min(l)<3: c=1print(a[(c<1)*2:])