結果
問題 |
No.2922 Rose Garden
|
ユーザー |
|
提出日時 | 2025-01-26 09:41:12 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 800 bytes |
コンパイル時間 | 253 ms |
コンパイル使用メモリ | 12,416 KB |
実行使用メモリ | 25,760 KB |
最終ジャッジ日時 | 2025-01-26 09:41:19 |
合計ジャッジ時間 | 5,950 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 WA * 1 |
other | AC * 10 WA * 40 |
ソースコード
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: print(first, second) 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()