結果

問題 No.182 新規性の虜
ユーザー 6soukiti29
提出日時 2019-07-20 18:13:47
言語 Nim
(2.2.0)
結果
AC  
実行時間 45 ms / 5,000 ms
コード長 264 bytes
コンパイル時間 3,503 ms
コンパイル使用メモリ 65,536 KB
実行使用メモリ 10,880 KB
最終ジャッジ日時 2024-07-02 05:55:41
合計ジャッジ時間 5,024 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 27
権限があれば一括ダウンロードができます
コンパイルメッセージ
/home/judge/data/code/Main.nim(1, 26) Warning: imported and not used: 'math' [UnusedImport]

ソースコード

diff #

import sequtils,strutils,math,algorithm
var
    N = stdin.readline.parseInt
    X = stdin.readline.split.map(parseInt)
    cnt : int
X.add(0)
X.add(1_000_000_007)
X.sort(cmp)
for i in 1 .. N:
    if X[i] != X[i - 1] and X[i] != X[i + 1]:
        cnt += 1
echo cnt
0