RBTREE'S HOME
RBTREE'S HOME
Home
Posts
Index
Private Training
About
Home Site
RBTREE'S HOME
Snowflake
◆
◆
祝大家 2024 新年快乐!
新的一年,大家有事没事多留点评论吧(
这个可能稍微有点小错位不要太在意(划掉
数学杂记(更新于 20241122)
2024-04-20
3 条评论
杂事
No tags
@1 强迫症的投掷器 20240420$n$ 个东西,每次等概率随机一个东西摸一下。问期望几次能摸过所有 $n$ 个东西。显然第一次一定会摸到一个新东西。考虑期望多少次操作能拿到第二种新东西。显然有 $\frac{n - 1}n$ 的概率摸到新东西,于是期望次数就是 $\frac n{n - 1}$ 次。再摸到第三个东西的期望次数就是 $\frac n{n - 2}$ 次。于是总答案就是$$...
Boids Algorithm
2025-08-18
0 条评论
杂事
No tags
OverviewLet us watch a demo first. Go to https://boids.rbtr.ee/ to see further.As you can see, the Boids algorithm is a method to simulate the movements of social creatures.AlgorithmThe Boids algo...
CEOI 2023 Grading Server
2025-07-31
0 条评论
做题笔记
动态规划
Grading ServerDespite running low on oil, the opening ceremony was a great success. Now, the committee is looking forward to the first competition day. But what’s this? The chairman of the Technica...
BalticOI 2022 Vault
2025-07-22
0 条评论
做题笔记
动态规划
动态规划优化
VaultThere are $2M + 1$ kinds of weights, whose mass are $-M, -M + 1, \ldots, M - 1, M$. However, you do not have an infinite number of weights. For each mass $\ell$, there are only $A_{\ell}$ such...
CSES 2421 Counting Reorders
2025-07-15
0 条评论
做题笔记
No tags
Counting ReordersCalculate the number of ways you can reorder the characters of a string so that no two adjacent characters are the same.For example, the answer for aabc is $6$, because the possibl...
CSES 2429 Grid Completion
2025-07-15
0 条评论
做题笔记
No tags
Grid CompletionYour task is to create an $n \times n$ grid whose each row and column has exactly one $\texttt A$ and $\texttt B$. Some of the characters have already been placed. In how many ways c...
CSES 2176 Counting Bishops
2025-07-14
0 条评论
做题笔记
动态规划
Counting BishopsYour task is to count the number of ways $k$ bishops can be placed on an $n \times n$ chessboard so that no two bishops attack each other.Two bishops attack each other if they are o...
CSES 3400 Raab Game II
2025-07-13
0 条评论
做题笔记
动态规划
Raab Game IIConsider a two player game where each player has $n$ cards numbered $1, 2, \ldots, n$. On each turn both players place one of their cards on the table. The player who placed the higher ...
CSES 3414 Filled Subgrid Count II
2025-07-12
2 条评论
做题笔记
No tags
Filled Subgrid Count IIYou are given a grid of letters. Your task is to calculate, for each letter, the number of rectangular subgrids whose each letter is the same.$1 \leq n \leq 3000$$1 \leq \lef...
CSES 3227 Sliding Window Advertisement
2025-07-11
0 条评论
做题笔记
No tags
Sliding Window AdvertisementA fence consists of $n$ vertical boards. The width of each board is $1$ and their heights may vary.You want to attach a rectangular advertisement to the fence. Your task...
CSES 3152 Bubble Sort Rounds II
2025-06-06
0 条评论
做题笔记
Data Structures
Problem StatementGiven an array $a$ of $n$ integers, find out the contents of the array after $k$ bubble sort rounds.$1 \leq n \leq 2 \times 10^5, 0 \leq k \leq 10^9, 1 \leq a_i \leq 10^9$Editorial...
1
2
...
18
×