結果
問題 |
No.1820 NandShift
|
ユーザー |
![]() |
提出日時 | 2021-08-27 15:46:54 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 365 bytes |
コンパイル時間 | 2,296 ms |
コンパイル使用メモリ | 195,784 KB |
最終ジャッジ日時 | 2025-01-24 02:17:01 |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 2 |
other | WA * 30 |
ソースコード
#include <bits/stdc++.h> #include <atcoder/modint> using namespace std; using mint = atcoder::modint998244353; mint res; int main() { int n, m; cin >> n >> m; string x; cin >> x; vector<string> a(n); for(auto &s : a) cin >> s; mint cur = 1; for(int i = m - 1; i >= 0; --i) { if(x[i] == '1') res += cur; cur *= 2; } cout << (res + 1).val() << endl; }