введите описание ссылки здесь
И я написал код ниже:
Код: Выделить всё
class Solution {
public:
static constexpr int MOD = 1'000'000'007;
int checkRecord(int n) {
int dp[2][3];
int dp2[2][3];
memset(dp, 0, sizeof(dp));
memset(dp2,0,sizeof(dp2));
for (int j = 0; j
Подробнее здесь: [url]https://stackoverflow.com/questions/70035492/c-why-does-int-overflow-still-happen-after-modding-1000000007[/url]