結果
| 問題 |
No.1876 Xor of Sum
|
| ユーザー |
|
| 提出日時 | 2022-05-03 17:31:14 |
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 341 bytes |
| コンパイル時間 | 2,780 ms |
| コンパイル使用メモリ | 245,636 KB |
| 実行使用メモリ | 6,948 KB |
| 最終ジャッジ日時 | 2024-07-02 14:20:34 |
| 合計ジャッジ時間 | 3,634 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 1 WA * 26 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
const int mxN = 4e3;
int main(){
int n;
cin >> n;
bitset <mxN> dp;
dp[0] = 1;
for(int i = 0, a;i < n;i++){
cin >> a;
dp ^= (dp << a);
}
int ans = 0;
for(int i = 0;i < mxN;i++)
if(dp[i]) ans ^= i;
cout << ans << "\n";
return 0;
}