結果

問題 No.182 新規性の虜
コンテスト
ユーザー teio
提出日時 2020-07-26 15:22:32
言語 Perl
(5.42.0)
コンパイル:
perl -cw _filename_
実行:
perl -X _filename_
結果
AC  
実行時間 76 ms / 5,000 ms
コード長 287 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 118 ms
コンパイル使用メモリ 7,840 KB
実行使用メモリ 28,032 KB
最終ジャッジ日時 2026-03-17 14:52:36
合計ジャッジ時間 2,135 ms
ジャッジサーバーID
(参考情報)
judge1_0 / judge2_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 27
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.pl syntax OK

ソースコード

diff #
raw source code

# use strict;
# use warnings;

<>;
chomp(my $s = <>);
my @As = split(/\s/, $s);
my %d;
my %c;
foreach (@As) {
    next if exists($c{$_});
    if (exists($d{$_})) {
        delete $d{$_};
        $c{$_} = undef;
    } else {
        $d{$_} = undef;
    }
}
print(scalar(keys(%d)), "\n");
0