P814
projecteuler.net

Mezzo-forte

ℹ️Published on Saturday, 29th October 2022, 11:00 pm; Solved by 230;
Difficulty rating: 50%

$4n$ people stand in a circle with their heads down. When the bell rings they all raise their heads and either look at the person immediately to their left, the person immediately to their right or the person diametrically opposite. If two people find themselves looking at each other they both scream.

Define $S(n)$ to be the number of ways that exactly half of the people scream. You are given $S(1) = 48$ and $S(10) \equiv 420121075 \mod{998244353}$.

Find $S(10^3)$. Enter your answer modulo $998244353$.



Soluzione

Last modified: May 01, 2025. Website built with Franklin.jl and the lovely Julia programming language.