結果

問題 No.183 たのしい排他的論理和(EASY)
ユーザー te-shte-sh
提出日時 2016-09-12 14:27:52
言語 D
(dmd 2.106.1)
結果
WA  
実行時間 -
コード長 439 bytes
コンパイル時間 826 ms
コンパイル使用メモリ 107,792 KB
実行使用メモリ 10,448 KB
最終ジャッジ日時 2023-09-02 22:04:53
合計ジャッジ時間 7,676 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,368 KB
testcase_01 AC 1 ms
4,372 KB
testcase_02 WA -
testcase_03 AC 2 ms
4,372 KB
testcase_04 AC 2 ms
4,372 KB
testcase_05 WA -
testcase_06 AC 2 ms
4,368 KB
testcase_07 TLE -
testcase_08 -- -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
権限があれば一括ダウンロードができます

ソースコード

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!(to!long).array;

  bool[long] memo;
  memo[0L] = true;

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

  writeln(memo.length);
}
0