結果
問題 | No.1456 Range Xor |
ユーザー | kotatsugame |
提出日時 | 2021-03-31 21:09:41 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 87 ms / 2,000 ms |
コード長 | 286 bytes |
コンパイル時間 | 816 ms |
コンパイル使用メモリ | 73,616 KB |
実行使用メモリ | 7,552 KB |
最終ジャッジ日時 | 2024-12-15 11:29:52 |
合計ジャッジ時間 | 3,777 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 46 |
コンパイルメッセージ
main.cpp:5:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 5 | main() | ^~~~
ソースコード
#include<iostream> #include<set> using namespace std; int N,K; main() { cin>>N>>K; set<int>S; S.insert(0); int now=0; for(int i=0;i<N;i++) { int A;cin>>A; now^=A; if(S.find(now^K)!=S.end()) { cout<<"Yes"<<endl; return 0; } S.insert(now); } cout<<"No"<<endl; }