結果

問題 No.961 Vibrant Fillumination
ユーザー QCFiumQCFium
提出日時 2020-01-23 21:25:18
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
TLE  
実行時間 -
コード長 1,004 bytes
コンパイル時間 3,719 ms
コンパイル使用メモリ 184,268 KB
実行使用メモリ 4,348 KB
最終ジャッジ日時 2023-10-19 00:30:45
合計ジャッジ時間 12,680 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,348 KB
testcase_01 AC 2 ms
4,348 KB
testcase_02 TLE -
testcase_03 -- -
testcase_04 -- -
testcase_05 -- -
testcase_06 -- -
testcase_07 -- -
testcase_08 -- -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
testcase_22 -- -
testcase_23 -- -
testcase_24 -- -
testcase_25 -- -
testcase_26 -- -
testcase_27 -- -
testcase_28 -- -
testcase_29 -- -
testcase_30 -- -
testcase_31 -- -
testcase_32 -- -
testcase_33 -- -
testcase_34 -- -
testcase_35 -- -
testcase_36 -- -
testcase_37 -- -
testcase_38 -- -
testcase_39 -- -
testcase_40 -- -
testcase_41 -- -
testcase_42 -- -
testcase_43 -- -
testcase_44 -- -
testcase_45 -- -
testcase_46 -- -
testcase_47 -- -
testcase_48 -- -
testcase_49 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

#pragma GCC target("avx2")
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
#include <bits/stdc++.h>

int ri() {
	int n;
	scanf("%d", &n);
	return n;
}
int64_t rs64() {
	int64_t n;
	scanf("%" SCNd64, &n);
	return n;
}

int main() {
	int n = ri();
	int64_t h[n];
	for (auto &i : h) i = rs64();
	int x1[n], x2[n], y1[n], y2[n], c[n];
	for (int i = 0; i < n; i++) x1[i] = ri(), y1[i] = ri(), x2[i] = ri(), y2[i] = ri(), c[i] = ri() - 1;
	int q = ri();
	clock_t r0 = clock();
	bool tmp0[n], tmp[n];
	for (int i = 0; i < q; i++) {
		memset(tmp, 0, sizeof(tmp));
		int x = ri(), y = ri();
		for (int j = 0; j < n; j++) tmp0[j] = x1[j] <= x && x < x2[j];
		for (int j = 0; j < n; j++) tmp0[j] &= y1[j] <= y && y < y2[j];
		for (int j = 0; j < n; j++) if (tmp0[j]) tmp[c[j]] = true;
		int64_t res = 0;
		for (int j = 0; j < n; j++) if (tmp[j]) res ^= h[j];
		printf("%lld\n", (long long) res);
	}
	clock_t r1 = clock();
	std::cerr << (double) (r1 - r0) / CLOCKS_PER_SEC << std::endl;
	return 0;
}
0