結果
問題 | No.2879 Range Flip Queries |
ユーザー |
|
提出日時 | 2024-09-10 17:19:46 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 465 ms / 2,000 ms |
コード長 | 617 bytes |
コンパイル時間 | 2,943 ms |
コンパイル使用メモリ | 252,292 KB |
実行使用メモリ | 19,500 KB |
最終ジャッジ日時 | 2024-09-10 17:20:06 |
合計ジャッジ時間 | 14,111 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 30 |
ソースコード
#include <bits/stdc++.h> #include <atcoder/lazysegtree> using namespace std; using namespace atcoder; using ll = long long; using T = ll; using F = ll; T op(T l, T r) { return 0; } T e() { return 0; } T fx(F f, T x) { return f ^ x; } F fg(F f, F g) { return f ^ g; } F id() { return 0; } int main() { ios::sync_with_stdio(false); cin.tie(nullptr); ll N, Q; cin >> N >> Q; vector<ll> A(N); for(auto &i : A) { cin >> i; } lazy_segtree<T, op, e, F, fx, fg, id> S(A); while(Q--) { ll l, r; cin >> l >> r; S.apply(--l, r, 1); } for(ll i = 0; i < N; i++) { cout << S.get(i) << " "; } }