// compile: g++ -o data data.cpp -O3 -std=gnu++20 -Wall -Wextra -Wshadow -D_GLIBCXX_ASSERTIONS -ggdb3 -fmax-errors=2 -DLOCAL
// run: ./data < data.in
#include <bits/stdc++.h>
using namespace std;
#pragma GCC optimize("O3,unroll-loops")
#pragma GCC target("avx2,bmi,bmi2,lzcnt,popcnt")
#ifdef LOCAL
#include <debug/codeforces.h>
#define debug(x...) {_variables(#x);_print(x);}
#else
#define debug(x...)
#endif
template<typename...Args> void print_(Args...args){((cout<<args<<" "),...)<<endl;}
#define rep(i,a,b) for(int i=(a);i<(int)(b);++i)
#define sz(v) ((int)(v).size())
#define print(...) print_(__VA_ARGS__);
#define INTMAX (int)(9223372036854775807)
#define INTINF (int)(1152921504606846976)
// #define int long long
#define MAXN 200010
#include <atcoder/modint>
using namespace atcoder;
int n, p;
using mint = modint998244353;
mint dp[MAXN];
int32_t main() {
ios::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr);
cin >> n >> p;
dp[1] = mint(1);
rep(i, 2, n+1) {
dp[i] = ((dp[i-1] * (100-p) + dp[i-2] * (p)) / 100) + 1;
}
cout << dp[n].val() << endl;
return 0;
}
Been playing s9game for a couple of days now and it’s really grown on me. It’s engaging. Check it out here s9game
If you’re a fan of gà đòn c1, this site is for you. The best place on the internet for this kind of content. Check it out now at gà đòn c1.
Anyone using ketqua04 for their results? I’m curious if it’s accurate compared to others. Let me know what you think! Here’s the link: ketqua04