結果
問題 |
No.1503 Bitwise And Convolution Twisted
|
ユーザー |
![]() |
提出日時 | 2020-12-31 22:54:06 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 541 bytes |
コンパイル時間 | 607 ms |
コンパイル使用メモリ | 72,168 KB |
最終ジャッジ日時 | 2025-01-17 08:48:40 |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 5 TLE * 4 |
ソースコード
#include <iostream> #include <vector> int main() { using ll = long long; std::ios::sync_with_stdio(false); std::cin.tie(nullptr); int N; std::cin >> N; const int m = 1 << N; std::vector<ll> A(m), B(m), C(m, 0); for (ll &e : A) { std::cin >> e; } for (ll &e : B) { std::cin >> e; } for (int k = 0; k != m; ++k) { for (int i = 0; i != m; ++i) { C[k] = (C[k] + A[i] * B[i & k]) % 998244353; } } for (int i = 0; i != m; ++i) { std::cout << C[i] << " \n"[i + 1 == m]; } return 0; }