結果
| 問題 | No.3790 Unlabeled Slime Trees |
| コンテスト | |
| ユーザー |
DeltaStruct
|
| 提出日時 | 2026-09-22 12:30:49 |
| 言語 | C++23(gnu拡張) (gcc 15.3.0 + boost 1.92.0 + ACL) |
| 結果 |
WA
不安定
|
| 実行時間 | - |
| コード長 | 403 bytes |
| 記録 | |
| コンパイル時間 | 2,200 ms |
| コンパイル使用メモリ | 343,636 KB |
| 実行使用メモリ | 7,856 KB |
| 最終ジャッジ日時 | 2026-11-06 20:58:19 |
| 合計ジャッジ時間 | 8,466 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 1 |
| other | TLE * 1 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
#include <atcoder/modint>
using mint = atcoder::modint998244353;
int main(){
vector<mint> dp(1e6+1);
for (int i(3);i <= 1e6;++i){
mint t = mint(2).pow(i-1);
dp[i] = dp[i]*t*(t/2);
dp[i] -= (t/4-1)*(t/2)*(t/2);
dp[i] += (t/2+1)*(t/2)/2-1;
}
int q; cin >> q;
while(q--){
int n; cin >> n;
cout << (dp[n]+1).val() << endl;
}
}
DeltaStruct