結果
問題 |
No.961 Vibrant Fillumination
|
ユーザー |
|
提出日時 | 2019-10-20 20:36:03 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 888 bytes |
コンパイル時間 | 823 ms |
コンパイル使用メモリ | 71,524 KB |
最終ジャッジ日時 | 2025-01-08 00:19:02 |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 1 TLE * 47 |
ソースコード
#include <iostream> #include <vector> #include <bitset> using ull = unsigned long long; using usize = std::size_t; constexpr usize NMAX = 50000; ull h[NMAX]; std::bitset<NMAX> used; usize a[NMAX], b[NMAX], c[NMAX], d[NMAX], e[NMAX]; int main() { std::cin.tie(nullptr), std::ios::sync_with_stdio(false); usize N; std::cin >> N; for (usize i = 0; i < N; i++) { std::cin >> h[i]; } 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, p, q; i < Q; i++) { used.reset(); 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; }