結果
問題 |
No.8119 間に合いませんでした><;
|
ユーザー |
|
提出日時 | 2025-01-17 17:01:56 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 1,007 bytes |
コンパイル時間 | 2,509 ms |
コンパイル使用メモリ | 213,276 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2025-01-17 17:28:01 |
合計ジャッジ時間 | 3,010 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 25 TLE * 4 |
ソースコード
// shobonvip さんの爆速提出(2025-01-17 05:18:31) // https://mojacoder.app/users/ecottea/problems/hop_step_jump/submissions/de56927c-f726-435b-9b6b-d9689ce4e44f //#pragma GCC target("avx") #pragma GCC optimize("Ofast") #pragma GCC optimize("unroll-loops") #include<bits/stdc++.h> using namespace std; int e1[270001]; int e2[270001]; int dp[14001]; int main() { ios::sync_with_stdio(false); std::cin.tie(nullptr); int n; cin >> n; constexpr int mask = 2147483647; for (int i=0; i<=n; i++) { char x; cin >> x; if (x == 'o') { e1[((i%5)<<15)|(i/5)] = mask; e2[((i%8)<<15)|(i/8)]= mask; } } if (n % 10 != 0) { cout << 0 << '\n'; return 0; } dp[0] = 1; for (int i=1; i<=n/10; i++){ int w = i*10; if (!e1[((w%5)<<15)|(w/5)]) continue; long long t = 0; int a = ((w%5)<<15)|((w-5*i)/5); int b = ((w%8)<<15)|((w-8*i)/8); for (int k=0; k<i; k++) { t += dp[k] & e1[a+k] & e2[b+k]; } dp[i] = static_cast<int>(t % 998244353); } cout << dp[n/10] << '\n'; }