結果
| 問題 | 
                            No.8119 間に合いませんでした><;
                             | 
                    
| コンテスト | |
| ユーザー | 
                             | 
                    
| 提出日時 | 2025-04-02 12:36:33 | 
| 言語 | C++17(clang)  (17.0.6 + boost 1.87.0)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 464 bytes | 
| コンパイル時間 | 5,058 ms | 
| コンパイル使用メモリ | 171,984 KB | 
| 実行使用メモリ | 7,844 KB | 
| 最終ジャッジ日時 | 2025-04-02 12:36:41 | 
| 合計ジャッジ時間 | 7,411 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge4 / judge3 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 1 | 
| other | AC * 15 WA * 7 TLE * 1 -- * 6 | 
ソースコード
#include<bits/stdc++.h>
using namespace std;
#include<atcoder/modint>
// #define int long long
using mint =atcoder::modint998244353;
signed main(){
    int n;cin>>n;
    string s;cin>>s;
    vector<mint>dp(n+1,0);
    dp[0]=1;
    for(int i=0;i<n;i++){
        for(int k=1;k<=(n-i)/10+10;k++){
            if (i+k*10>=n+1)continue;
            if(s[i+2*k]=='o' && s[i+3*k]=='o' && s[i+5*k]=='o')dp[i+10*k]+=dp[i];
        }    
    }
    cout<<dp[n].val()<<endl;
}