結果

問題 No.183 たのしい排他的論理和(EASY)
ユーザー te-sh
提出日時 2016-09-12 14:25:43
言語 D
(dmd 2.109.1)
結果
WA  
実行時間 -
コード長 456 bytes
コンパイル時間 961 ms
コンパイル使用メモリ 123,768 KB
実行使用メモリ 21,368 KB
最終ジャッジ日時 2024-06-12 04:18:59
合計ジャッジ時間 7,465 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 2 WA * 3 TLE * 1 -- * 12
権限があれば一括ダウンロードができます

ソースコード

diff #

import std.algorithm, std.array, std.container, std.range, std.bitmanip;
import std.numeric, std.math, std.bigint, std.random, core.bitop;
import std.string, std.regex, std.conv, std.stdio, std.typecons;

void main()
{
  auto n = readln.chomp.to!size_t;
  auto ai = readln.split.map!(a => BigInt(a)).array;

  bool[BigInt] memo;
  memo[BigInt(0)] = true;

  foreach (a; ai)
    foreach (i; memo.byKey)
      memo[a ^ i] = true;

  writeln(memo.length);
}

0