結果
問題 |
No.2922 Rose Garden
|
ユーザー |
|
提出日時 | 2025-01-26 09:42:16 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 776 bytes |
コンパイル時間 | 551 ms |
コンパイル使用メモリ | 11,904 KB |
実行使用メモリ | 25,468 KB |
最終ジャッジ日時 | 2025-01-26 09:42:22 |
合計ジャッジ時間 | 5,068 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 25 WA * 25 |
ソースコード
def main(): arrival_judgment() def arrival_judgment(): G, H = [input() for _ in range(2)] H = H.split() H_first_half = H[0: len(H) // 2] H_second_half = H[len(H) // 2: len(H)] half_half = H[len(H) // 2 - 3: len(H) // 2 + 3] G = G.split() N, S, B = (int(i) for i in G) remainder = S * B yes_no(H_first_half, H_second_half, half_half, remainder) def checker(l, r): half = len(l) // 2 remainder = r for i in range(half): first = int(l[i + 1]) - int(l[i]) second = int(l[-1 + -i]) - int(l[-2 + -i]) if first > remainder or second > remainder: return False return True def yes_no(h_f, h_s, h_h, r): if checker(h_f, r) == True and checker(h_s, r) == True and checker(h_h, r) == True: print('Yes') else: print('No') if __name__ == '__main__': main()