結果

問題 No.1674 Introduction to XOR
コンテスト
ユーザー neko_the_shadow
提出日時 2021-10-13 19:21:34
言語 Perl
(5.42.1)
コンパイル:
perl -cw _filename_
実行:
perl -X _filename_
結果
AC  
実行時間 6 ms / 1,000 ms
コード長 195 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 280 ms
コンパイル使用メモリ 6,400 KB
実行使用メモリ 6,400 KB
最終ジャッジ日時 2026-04-06 09:05:41
合計ジャッジ時間 988 ms
ジャッジサーバーID
(参考情報)
judge2_1 / judge1_1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 21
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.pl syntax OK

ソースコード

diff #
raw source code

use strict;
use warnings;
use List::Util qw(first);

my $n = <>;
my @a = split / /, <>;

for (my $x = 1; ; $x *= 2) {
    unless (first {$_ & $x} @a) {
        print "$x\n";
        exit;
    }
}
0