結果
問題 | No.961 Vibrant Fillumination |
ユーザー |
![]() |
提出日時 | 2020-01-23 21:25:18 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 1,004 bytes |
コンパイル時間 | 2,703 ms |
コンパイル使用メモリ | 183,268 KB |
実行使用メモリ | 10,368 KB |
最終ジャッジ日時 | 2024-09-18 20:28:25 |
合計ジャッジ時間 | 11,213 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | TLE * 1 -- * 47 |
ソースコード
#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;}