結果

問題 No.961 Vibrant Fillumination
ユーザー QCFiumQCFium
提出日時 2020-01-23 21:33:09
言語 C++17(clang)
(17.0.6 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 1,036 bytes
コンパイル時間 490 ms
コンパイル使用メモリ 84,688 KB
実行使用メモリ 9,368 KB
最終ジャッジ日時 2023-08-20 13:47:22
合計ジャッジ時間 9,073 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
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 #

#include <time.h>
#include <string.h>
#include <stdint.h>
#include <cinttypes>
#include <iostream>

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

#define y1 y1_dummy
bool tmp0[50000], tmp[50000];
int x1[50000], x2[50000], y1[50000], y2[50000], c[50000];
int64_t h[50000];
int main() {
	int n = ri();
	for (auto &i : h) i = rs64();
	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();
	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