2020年9月13日

摘要: 地址 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)
摘要: 地址 https://leetcode-cn.com/problems/count-unhappy-friends/ 算法1这一题感觉很迷,考点是模拟和哈希?将给于的数据转换成哈希便于查找(使用数组下标会更加快速定位,我这里使用的是map)然后根据题意模拟,进行处理. C++ 代码 class So 阅读全文
posted @ 2020-09-13 23:27 itdef 阅读(174) 评论(0) 推荐(0)

导航