結果
問題 |
No.1410 A lot of Bit Operations
|
ユーザー |
![]() |
提出日時 | 2021-02-26 23:14:18 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 480 bytes |
コンパイル時間 | 3,106 ms |
コンパイル使用メモリ | 196,728 KB |
最終ジャッジ日時 | 2025-01-19 06:58:12 |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 8 WA * 34 RE * 2 |
ソースコード
#include <bits/stdc++.h> #include <atcoder/modint> using namespace std; using namespace atcoder; using mint = modint1000000007; const vector<int> c{0, 1, 1, 2, 1, 2, 2, 3}; int main() { int64_t n; cin >> n; string k; cin >> k; mint ans = 0; for (int i = 0; i < 8; i++) { if (k.at(i) == 'o') { ans += mint(2).pow(n - 1) * (mint(4).pow(n) + mint(c[i]).pow(n) + mint(4 - c[i]).pow(n)); } } cout << ans.val() << endl; }