会员
周边
新闻
博问
闪存
众包
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
itdef
2020年9月13日
LeetCode lcp018. 早餐组合 二分
摘要: 地址 https://leetcode-cn.com/problems/2vYnGI/ 算法1(暴力枚举) O(n2)O(n2)暴力 第52个数据超时了 C++ 代码 class Solution { public: int breakfastNumber(vector<int>& staple,
阅读全文
posted @ 2020-09-13 23:29 itdef
阅读(289)
评论(0)
推荐(0)
LeetCode 5512. 统计不开心的朋友 模拟 哈希
摘要: 地址 https://leetcode-cn.com/problems/count-unhappy-friends/ 算法1这一题感觉很迷,考点是模拟和哈希?将给于的数据转换成哈希便于查找(使用数组下标会更加快速定位,我这里使用的是map)然后根据题意模拟,进行处理. C++ 代码 class So
阅读全文
posted @ 2020-09-13 23:27 itdef
阅读(174)
评论(0)
推荐(0)
导航
博客园
首页
新随笔
联系
订阅
管理
公告