結果
問題 |
No.206 数の積集合を求めるクエリ
|
ユーザー |
|
提出日時 | 2017-01-05 12:50:06 |
言語 | D (dmd 2.109.1) |
結果 |
TLE
|
実行時間 | - |
コード長 | 653 bytes |
コンパイル時間 | 1,119 ms |
コンパイル使用メモリ | 124,008 KB |
実行使用メモリ | 13,896 KB |
最終ジャッジ日時 | 2024-06-12 06:15:31 |
合計ジャッジ時間 | 11,680 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 21 TLE * 1 -- * 6 |
ソースコード
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; } }