結果
問題 | No.803 Very Limited Xor Subset |
ユーザー | heno239 |
提出日時 | 2019-03-17 20:07:04 |
言語 | C++14 (gcc 12.3.0 + boost 1.83.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 737 bytes |
コンパイル時間 | 1,527 ms |
コンパイル使用メモリ | 168,196 KB |
実行使用メモリ | 4,384 KB |
最終ジャッジ日時 | 2023-09-22 01:50:36 |
合計ジャッジ時間 | 6,421 ms |
ジャッジサーバーID (参考情報) |
judge15 / judge13 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 2 ms
4,376 KB |
testcase_01 | AC | 2 ms
4,380 KB |
testcase_02 | AC | 2 ms
4,380 KB |
testcase_03 | AC | 4 ms
4,376 KB |
testcase_04 | AC | 65 ms
4,376 KB |
testcase_05 | AC | 65 ms
4,376 KB |
testcase_06 | AC | 65 ms
4,376 KB |
testcase_07 | AC | 65 ms
4,380 KB |
testcase_08 | AC | 70 ms
4,376 KB |
testcase_09 | AC | 66 ms
4,376 KB |
testcase_10 | AC | 78 ms
4,380 KB |
testcase_11 | AC | 81 ms
4,380 KB |
testcase_12 | AC | 70 ms
4,376 KB |
testcase_13 | AC | 85 ms
4,384 KB |
testcase_14 | WA | - |
testcase_15 | WA | - |
testcase_16 | WA | - |
testcase_17 | WA | - |
testcase_18 | WA | - |
testcase_19 | WA | - |
testcase_20 | WA | - |
testcase_21 | WA | - |
testcase_22 | WA | - |
testcase_23 | AC | 4 ms
4,376 KB |
testcase_24 | WA | - |
testcase_25 | WA | - |
testcase_26 | WA | - |
testcase_27 | WA | - |
testcase_28 | WA | - |
testcase_29 | WA | - |
testcase_30 | WA | - |
testcase_31 | WA | - |
testcase_32 | WA | - |
testcase_33 | WA | - |
testcase_34 | WA | - |
testcase_35 | WA | - |
testcase_36 | WA | - |
testcase_37 | WA | - |
testcase_38 | AC | 1,094 ms
4,380 KB |
testcase_39 | AC | 1,096 ms
4,380 KB |
testcase_40 | WA | - |
testcase_41 | AC | 2 ms
4,380 KB |
testcase_42 | WA | - |
testcase_43 | AC | 13 ms
4,376 KB |
testcase_44 | AC | 2 ms
4,380 KB |
testcase_45 | AC | 2 ms
4,380 KB |
testcase_46 | WA | - |
ソースコード
#include<bits/stdc++.h> using namespace std; #define rep(i,n) for(int i=0;i<n;i++) #define Rep1(i,sta,n) for(int i=sta;i<=n;i++) struct zyoken { int t, l, r; }; zyoken z[300]; //愚直な全探索☆ int main() { int n, m, x; cin >> n >> m >> x; vector<int> a(n); rep(i, n) { cin >> a[i]; } rep(i, m) { cin >> z[i].t >> z[i].l >> z[i].r; z[i].l--; z[i].r--; } int cnt = 0; rep(i, (1 << n)) { int u[20] = {}; int s = 0; rep(j, n) { if (i&(1 << j)) { s ^= a[j]; u[j] = 1; } } if (s == x) { bool f = true; rep(j, m) { int num = 0; Rep1(k, z[j].l, z[j].r) { if (i&(1 << k))num ^= 1; } if (num^z[j].t)f = false; } if (f)cnt++; } } cout << cnt << endl; return 0; }