专栏文章
Solution of AT_tenka1_2018_e Equilateral
AT_tenka1_2018_e题解参与者 1已保存评论 0
文章操作
快速查看文章及其快照的属性,并进行相关操作。
- 当前评论
- 0 条
- 当前快照
- 1 份
- 快照标识符
- @miqyaygq
- 此快照首次捕获于
- 2025/12/04 12:43 3 个月前
- 此快照最后确认于
- 2025/12/04 12:43 3 个月前
你可以浏览这个题解的中文版本。
The images are hosted on Github, use an accelerator if it fails to load.
Consider drawing the Huffman distance of three points.

Then we have , i.e. . This means that the slope of is and is on a line parallel to it.
We might as well enumerate , enumerate , and compute the number of legal by difference . Complexity with large constants.
Specifically, we enumerate and , and the problem translates into finding the number of on the four lines. It is sufficient to preprocess the prefix sum for each line with slope .

Note that to avoid double counting
, it may be worthwhile to count the special endpoint positions separately.
相关推荐
评论
共 0 条评论,欢迎与作者交流。
正在加载评论...