biweekly-contest-23
[TOC]
- Count Largest Group3
- Construct K Palindrome Strings5
- Circle and Rectangle Overlapping5
- Reducing Dishes6
1
1 | class Solution: |
2
1 | class Solution: |
3
事后看一两三四五的解法,做出来的
https://www.bilibili.com/video/BV1Ae411x7fa/?p=1
LeetCode 考的是智商吧
求距离时不要用 根号,反之把半径平方即可比较,否则会很慢
1 | class Solution: |
另一种思路:
将矩形扩大后判断圆心是否在里面,接着判断圆心到四个顶点的距离是否不大于 r
其实这就是上面解法的另一种解释

4
1 | class Solution: |
- 本文标题:biweekly-contest-23
- 本文作者:zronghui
- 本文链接:https://zronghui.github.io/Leetcode weekly contest/biweekly-contest-23.html
- 版权声明:本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明出处!
# 推荐文章
1.biweekly-contest-22
2.面试题 01.07 旋转矩阵
3.chrome 插件
4.biweekly-contest-23
5.weekly-contest-180
1.biweekly-contest-22
2.面试题 01.07 旋转矩阵
3.chrome 插件
4.biweekly-contest-23
5.weekly-contest-180