結果
問題 |
No.961 Vibrant Fillumination
|
ユーザー |
|
提出日時 | 2019-10-20 20:31:38 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 948 bytes |
コンパイル時間 | 2,100 ms |
コンパイル使用メモリ | 195,864 KB |
最終ジャッジ日時 | 2025-01-08 00:14:09 |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 1 TLE * 47 |
ソースコード
#include <bits/stdc++.h> using ull = unsigned long long; using usize = std::size_t; constexpr usize NMAX = 50000; bool used[NMAX]; int main() { std::cin.tie(nullptr), std::ios::sync_with_stdio(false); usize N; std::cin >> N; std::vector<ull> h(N, 0ULL); for (usize i = 0; i < N; i++) { std::cin >> h[i]; } const usize L = 2 * N; std::vector<usize> a(N, 0), b(N, 0), c(N, L), d(N, L), e(N, 0); for (usize i = 0; i < N; i++) { std::cin >> a[i] >> b[i] >> c[i] >> d[i] >> e[i], e[i]--; } usize Q; std::cin >> Q; for (usize i = 0; i < Q; i++) { std::fill(used, used + N, false); usize p, q; std::cin >> p >> q; ull ans = 0; for (usize j = 0; j < N; j++) { if (a[j] <= p and p < c[j] and b[j] <= q and q < d[j] and not used[e[j]]) { used[e[j]] = true, ans ^= h[e[j]]; } } std::cout << ans << "\n"; } return 0; }