結果

問題 No.206 数の積集合を求めるクエリ
ユーザー nebukuro09nebukuro09
提出日時 2017-01-05 12:50:06
言語 D
(dmd 2.106.1)
結果
TLE  
実行時間 -
コード長 653 bytes
コンパイル時間 1,090 ms
コンパイル使用メモリ 119,712 KB
実行使用メモリ 11,372 KB
最終ジャッジ日時 2023-09-03 00:23:39
合計ジャッジ時間 11,786 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,380 KB
testcase_01 AC 1 ms
4,380 KB
testcase_02 AC 1 ms
4,380 KB
testcase_03 AC 2 ms
4,380 KB
testcase_04 AC 1 ms
4,380 KB
testcase_05 AC 2 ms
4,376 KB
testcase_06 AC 1 ms
4,384 KB
testcase_07 AC 2 ms
4,380 KB
testcase_08 AC 2 ms
4,376 KB
testcase_09 AC 2 ms
4,376 KB
testcase_10 AC 2 ms
4,380 KB
testcase_11 AC 4 ms
5,156 KB
testcase_12 AC 387 ms
7,464 KB
testcase_13 AC 271 ms
7,184 KB
testcase_14 AC 132 ms
7,448 KB
testcase_15 AC 54 ms
6,712 KB
testcase_16 AC 55 ms
6,676 KB
testcase_17 AC 33 ms
11,372 KB
testcase_18 AC 15 ms
5,920 KB
testcase_19 AC 29 ms
8,004 KB
testcase_20 AC 13 ms
5,424 KB
testcase_21 AC 19 ms
6,360 KB
testcase_22 AC 19 ms
6,492 KB
testcase_23 AC 31 ms
10,608 KB
testcase_24 TLE -
testcase_25 -- -
testcase_26 -- -
testcase_27 -- -
testcase_28 -- -
testcase_29 -- -
testcase_30 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

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

void main() {
    auto s = readln.split.map!(to!int);
    auto L = s[0];
    auto M = s[0];
    auto N = s[0];
    auto AN = readln.split.map!(to!int);
    auto BN = readln.split.map!(to!int);

    BitArray A, B;
    A.length = B.length = 10^^5+1;
    foreach (a; AN) A[a] = true;
    foreach (b; BN) B[b] = true;

    auto Q = readln.chomp.to!int;
    foreach (i; 0..Q) {
        (A&B).bitsSet.array.length.writeln;
        B <<= 1;
    }
}
0