結果
| 問題 |
No.206 数の積集合を求めるクエリ
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2016-09-16 10:08:16 |
| 言語 | D (dmd 2.109.1) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 622 bytes |
| コンパイル時間 | 822 ms |
| コンパイル使用メモリ | 127,048 KB |
| 実行使用メモリ | 13,888 KB |
| 最終ジャッジ日時 | 2024-06-12 04:25:22 |
| 合計ジャッジ時間 | 10,805 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 19 RE * 2 TLE * 1 -- * 6 |
ソースコード
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 rd = readln.split.map!(to!size_t);
auto l = rd[0], m = rd[1], n = rd[2];
auto ai = readln.split.map!(to!int).array;
auto bi = readln.split.map!(to!int).array;
auto q = readln.chomp.to!int;
ai.sort();
auto buf = new bool[](n + 1);
foreach (b; bi) buf[b] = true;
foreach (i; 0..q) {
writeln(ai.count!(a => buf[a]));
ai[] -= 1;
if (ai.front == 0) ai = ai[1..$];
}
}