# Tag Info

1

Optidad’s answer is almost perfect, but only if you ignore week numbers. If the first four days of a year or more fall into the same week, then they are in the first calendar week of the year. But if only one, two, or three of the first days fall into the same week, then they are in the last calendar week of the previous year. The last calendar week of ...

1

Basically, the "configuration" of a year, if I understand well can be described as a state $Y_i = (D_i, L_i)$ with $D_i$ the weekday of January the $1^{st}$ (0 to 6 for monday to sunday) and $L_i$ which is 1 if $Y_i$ is a leap year and 0 else. So, comparing the state of 2 years, you can decide wether they have the same configuration. As a year has 365 days ...

0

Your analysis looks correct to me. The answer should be N-2, not 2(N-1). It wouldn't be unheard of for graders/teachers to work with an incorrect solution.

Top 50 recent answers are included