結果
問題 |
No.406 鴨等間隔の法則
|
ユーザー |
![]() |
提出日時 | 2018-07-18 18:47:11 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 516 ms / 2,000 ms |
コード長 | 296 bytes |
コンパイル時間 | 165 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 48,532 KB |
最終ジャッジ日時 | 2024-07-07 12:28:31 |
合計ジャッジ時間 | 18,107 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 29 |
ソースコード
#!/usr/bin/env python3 import numpy def main(): _ = int(input()) xs = numpy.fromiter((int(x) for x in input().split()), dtype=numpy.int32) xs.sort() ds = numpy.diff(xs) print("YES" if ds[0] > 0 and numpy.all(ds == ds[0]) else "NO") if __name__ == "__main__": main()