結果
問題 | No.406 鴨等間隔の法則 |
ユーザー |
![]() |
提出日時 | 2024-02-26 21:21:04 |
言語 | Nim (2.2.0) |
結果 |
RE
|
実行時間 | - |
コード長 | 341 bytes |
コンパイル時間 | 3,659 ms |
コンパイル使用メモリ | 67,024 KB |
実行使用メモリ | 12,672 KB |
最終ジャッジ日時 | 2024-09-29 11:45:33 |
合計ジャッジ時間 | 5,678 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 RE * 1 |
other | AC * 27 RE * 2 |
ソースコード
import algorithm, sequtils, strutilsletn = parseInt readLine stdinxs = stdin.readLine.split.map(parseInt).sorted.deduplicate(true)d = xs[1].pred xs[0]if xs.len < n:echo "NO"quit()for i in 1..xs.high:if xs[i].pred(xs[i.pred]) != d:echo "NO"quit()echo "YES"