結果
問題 |
No.1456 Range Xor
|
ユーザー |
|
提出日時 | 2022-03-01 17:29:05 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 931 bytes |
コンパイル時間 | 2,492 ms |
コンパイル使用メモリ | 198,344 KB |
最終ジャッジ日時 | 2025-01-28 04:08:37 |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 5 WA * 3 TLE * 38 |
ソースコード
#include <atcoder/segtree.hpp> #include <bits/stdc++.h> using namespace std; using namespace atcoder; #define ll long long #define all(x) x.begin(),x.end() #define ar array #define sz(x) ((int)x.size()) #define lazycalc S, op, e, F, mapping, composition, id #define segcalc S, op, e template <class T,class S> inline bool chmin(T &a,const S &b) {return (a> b? a= b, 1: 0);} template <class T,class S> inline bool chmax(T &a,const S &b) {return (a< b? a= b, 1: 0);} using S = ll; S op(S a, S b){ return a ^ b; } S e(){ return 0; } int main(){ ios_base::sync_with_stdio(false),cin.tie(0); ll n, x; cin >> n >> x; vector <ll> arr(n); for(auto &ele: arr) cin >> ele; segtree <segcalc> seg(arr); bool ok = false; for(int i = 0;i < n;i++){ for(int j = i + 1;j < n;j++){ if(seg.prod(i, j) == x) ok = true; } } cout << (ok ? "Yes" : "No") << "\n"; return 0; }