結果
問題 |
No.961 Vibrant Fillumination
|
ユーザー |
![]() |
提出日時 | 2020-01-23 21:33:09 |
言語 | C++17(clang) (17.0.6 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 1,036 bytes |
コンパイル時間 | 598 ms |
コンパイル使用メモリ | 119,296 KB |
実行使用メモリ | 10,496 KB |
最終ジャッジ日時 | 2024-11-30 16:17:20 |
合計ジャッジ時間 | 286,351 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 2 |
other | WA * 1 TLE * 47 |
ソースコード
#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; }