結果
問題 | No.1304 あなたは基本が何か知っていますか?私は知っています. |
ユーザー | uzzy |
提出日時 | 2020-12-18 23:28:24 |
言語 | C++14 (gcc 12.3.0 + boost 1.83.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 1,276 bytes |
コンパイル時間 | 1,484 ms |
コンパイル使用メモリ | 167,332 KB |
実行使用メモリ | 39,320 KB |
最終ジャッジ日時 | 2024-06-12 16:32:50 |
合計ジャッジ時間 | 77,972 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 7 ms
26,836 KB |
testcase_01 | AC | 9 ms
39,320 KB |
testcase_02 | AC | 8 ms
26,908 KB |
testcase_03 | AC | 19 ms
39,280 KB |
testcase_04 | TLE | - |
testcase_05 | AC | 462 ms
26,880 KB |
testcase_06 | AC | 8 ms
26,812 KB |
testcase_07 | AC | 1,638 ms
26,896 KB |
testcase_08 | AC | 16 ms
26,920 KB |
testcase_09 | AC | 1,274 ms
26,804 KB |
testcase_10 | AC | 790 ms
27,036 KB |
testcase_11 | AC | 1,370 ms
26,900 KB |
testcase_12 | AC | 873 ms
26,904 KB |
testcase_13 | AC | 399 ms
27,000 KB |
testcase_14 | AC | 642 ms
26,984 KB |
testcase_15 | AC | 586 ms
26,896 KB |
testcase_16 | AC | 801 ms
26,908 KB |
testcase_17 | AC | 22 ms
26,860 KB |
testcase_18 | AC | 745 ms
39,260 KB |
testcase_19 | AC | 213 ms
26,860 KB |
testcase_20 | AC | 14 ms
26,924 KB |
testcase_21 | AC | 87 ms
26,988 KB |
testcase_22 | AC | 956 ms
26,856 KB |
testcase_23 | AC | 1,353 ms
26,892 KB |
testcase_24 | TLE | - |
testcase_25 | AC | 12 ms
26,808 KB |
testcase_26 | AC | 13 ms
26,848 KB |
testcase_27 | AC | 16 ms
26,856 KB |
testcase_28 | AC | 12 ms
26,840 KB |
testcase_29 | AC | 11 ms
26,852 KB |
testcase_30 | AC | 11 ms
26,824 KB |
testcase_31 | AC | 14 ms
26,876 KB |
testcase_32 | AC | 18 ms
26,872 KB |
testcase_33 | AC | 12 ms
26,900 KB |
testcase_34 | AC | 15 ms
27,032 KB |
testcase_35 | AC | 11 ms
26,964 KB |
testcase_36 | AC | 13 ms
26,960 KB |
testcase_37 | AC | 12 ms
19,720 KB |
testcase_38 | AC | 10 ms
19,736 KB |
testcase_39 | AC | 14 ms
19,728 KB |
testcase_40 | AC | 11 ms
19,784 KB |
testcase_41 | AC | 14 ms
19,812 KB |
testcase_42 | AC | 11 ms
19,800 KB |
testcase_43 | AC | 11 ms
19,776 KB |
testcase_44 | AC | 12 ms
19,804 KB |
04_evil_A_01 | WA | - |
04_evil_A_02 | WA | - |
04_evil_A_03 | WA | - |
04_evil_A_04 | WA | - |
04_evil_A_05 | WA | - |
04_evil_A_06 | WA | - |
04_evil_A_07 | WA | - |
04_evil_A_08 | WA | - |
04_evil_A_09 | WA | - |
04_evil_A_10 | WA | - |
05_evil_B_01 | TLE | - |
05_evil_B_02 | TLE | - |
05_evil_B_03 | TLE | - |
05_evil_B_04 | TLE | - |
05_evil_B_05 | TLE | - |
05_evil_B_06 | TLE | - |
05_evil_B_07 | TLE | - |
05_evil_B_08 | TLE | - |
05_evil_B_09 | TLE | - |
05_evil_B_10 | TLE | - |
06_evil_C_01 | TLE | - |
06_evil_C_02 | TLE | - |
06_evil_C_03 | TLE | - |
06_evil_C_04 | TLE | - |
06_evil_C_05 | TLE | - |
06_evil_C_06 | TLE | - |
06_evil_C_07 | TLE | - |
06_evil_C_08 | TLE | - |
06_evil_C_09 | TLE | - |
06_evil_C_10 | AC | 8 ms
39,580 KB |
ソースコード
//#pragma GCC optimize ("O2") //#pragma GCC target ("avx2") #include<bits/stdc++.h> //#include<atcoder/all> //using namespace atcoder; using namespace std; typedef long long ll; #define rep(i, n) for(int i = 0; i < (n); i++) #define rep1(i, n) for(int i = 1; i <= (n); i++) #define co(x) cout << (x) << "\n" #define cosp(x) cout << (x) << " " #define ce(x) cerr << (x) << "\n" #define cesp(x) cerr << (x) << " " #define pb push_back #define mp make_pair #define chmin(x, y) x = min(x, y) #define chmax(x, y) x = max(x, y) #define Would #define you #define please int main() { cin.tie(0); ios::sync_with_stdio(false); int N, K, X, Y; cin >> N >> K >> X >> Y; int A[1025] = {}; rep(i, K) { int a; cin >> a; A[a]++; } ll dat1[1025][1025] = {}, dat2[1025][1025] = {}; auto mae = dat1; auto tugi = dat2; mae[1024][0] = 1; A[1024] = 1; rep(n, N) { rep(k, 1024) if (A[k]) { auto tmp1 = tugi[k]; rep(j, 1025) if (A[j]) { auto tmp2 = mae[j]; rep(i, 1024) { tmp1[i ^ k] += tmp2[i] * (A[k] - (j == k)); } } } rep(i, 1025) rep(j, 1025) mae[i][j] = 0; swap(tugi, mae); } ll kotae = 0; rep(i, 1025) rep(j, 1025) { if (X <= j && j <= Y) { kotae += mae[i][j]; } } co(kotae % 998244353); Would you please return 0; }