Skip to content

Commit 00ed3ba

Browse files
Merge pull request #4250 from SansPapyrus683/master
jesus christ
2 parents 6fc6633 + 67d0940 commit 00ed3ba

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

solutions/gold/coci-16-burza.mdx

+4-4
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ unfortunately is still too large for an exponential time solution. But it is
3838

3939
### Further Analysis
4040

41-
To limit the maximum number of nodes to 20, we have to prove that a game can *always*
42-
end in $k$ moves if $k^2 \geq n$.
41+
To limit the maximum number of steps to a point where bitwise DP is feasible,
42+
we have to prove that a game can *always* end in $k$ moves if $k^2 \geq n$.
4343

4444
Since each move results in breaking a tree down into a bunch of smaller trees,
4545
we can do a [proof by induction](https://en.wikipedia.org/wiki/Mathematical_induction).
@@ -98,7 +98,7 @@ n_{r+1} \leq (k-r)^2-2(k-r)=(k-r-1)^2
9898
$$
9999

100100
And we're done! Since we've shown that any case where $k^2 \geq n$ will result in a win, we just
101-
have to handle the case where $N \leq 20$, for which
101+
have to handle the case where $k \lt 20$, for which
102102
[bitmask DP](/gold/dp-bitmasks) will suffice.
103103

104104
### Bitmask DP
@@ -125,7 +125,7 @@ yields a configuration that can cover up to the fifth leaf.
125125

126126
## Implementation
127127

128-
**Time Complexity:** $\mathcal{O}(2^{\sqrt{N}} \cdot N)$
128+
**Time Complexity:** $\mathcal{O}(2^{\sqrt{n}} \cdot n)$
129129

130130
<LanguageSection>
131131
<CPPSection>

0 commit comments

Comments
 (0)