上一页 1 ··· 82 83 84 85 86 87 88 89 90 ··· 125 下一页

2019年11月24日

摘要: 地址 https://leetcode-cn.com/problems/count-servers-that-communicate/ 题目描述这里有一幅服务器分布图,服务器的位置标识在 m * n 的整数矩阵网格 grid 中,1 表示单元格上有服务器,0 表示没有。 如果两台服务器位于同一行或者 阅读全文
posted @ 2019-11-24 15:26 itdef 阅读(389) 评论(0) 推荐(0)
摘要: 地址 https://leetcode-cn.com/problems/minimum-time-visiting-all-points/submissions/ 题目描述平面上有 n 个点,点的位置用整数坐标表示 points[i] = [xi, yi]。请你计算访问所有这些点需要的最小时间(以秒 阅读全文
posted @ 2019-11-24 15:11 itdef 阅读(522) 评论(0) 推荐(0)

2019年11月23日

摘要: 地址 https://algospot.com/judge/problem/read/NTHLON 1 #include <iostream> 2 #include <vector> 3 #include <algorithm> 4 #include <queue> 5 6 7 using name 阅读全文
posted @ 2019-11-23 16:41 itdef 阅读(289) 评论(0) 推荐(0)

2019年11月21日

摘要: 地址 https://algospot.com/judge/problem/read/CHILDRENDAY 题解 ac代码 1 #include <iostream> 2 #include <algorithm> 3 #include <queue> 4 #include <string> 5 # 阅读全文
posted @ 2019-11-21 14:51 itdef 阅读(207) 评论(0) 推荐(0)

2019年11月17日

摘要: 地址 https://leetcode-cn.com/problems/greatest-sum-divisible-by-three/ 题目描述给你一个整数数组 nums,请你找出并返回能被三整除的元素最大和。 算法1最后数组和 只有三种情况 1 除以3余0 直接返回2 除以3余1 那么要么减少一 阅读全文
posted @ 2019-11-17 13:50 itdef 阅读(600) 评论(0) 推荐(0)
摘要: 地址 https://leetcode-cn.com/contest/weekly-contest-163/problems/find-elements-in-a-contaminated-binary-tree/ 题目描述给出一个满足下述规则的二叉树: root.val == 0如果 treeNo 阅读全文
posted @ 2019-11-17 13:38 itdef 阅读(678) 评论(0) 推荐(0)

2019年11月15日

摘要: 地址 https://www.acwing.com/problem/content/description/519/ 有 n 个同学(编号为 1 到 n)正在玩一个信息传递的游戏。 在游戏里每人都有一个固定的信息传递对象,其中,编号为 i 的同学的信息传递对象是编号为 TiTi 的同学。 游戏开始时 阅读全文
posted @ 2019-11-15 23:07 itdef 阅读(203) 评论(0) 推荐(0)

2019年11月10日

摘要: 地址 https://leetcode-cn.com/problems/maximum-score-words-formed-by-letters/ 题目描述你将会得到一份单词表 words,一个字母表 letters (可能会有重复字母),以及每个字母对应的得分情况表 score。 请你帮忙计算玩 阅读全文
posted @ 2019-11-10 22:40 itdef 阅读(366) 评论(0) 推荐(0)
摘要: 地址 https://leetcode-cn.com/contest/weekly-contest-162/problems/number-of-closed-islands/ 有一个二维矩阵 grid ,每个位置要么是陆地(记号为 0 )要么是水域(记号为 1 )。 我们从一块陆地出发,每次可以往 阅读全文
posted @ 2019-11-10 14:46 itdef 阅读(274) 评论(0) 推荐(0)

2019年11月9日

摘要: 地址 https://algospot.com/judge/problem/read/SORTGAME 解答 常规BFS是会超时的 按照书上的提示 应该是打表(居然还有提倡打表的题目) tle 代码 1 #include <iostream> 2 #include <vector> 3 #inclu 阅读全文
posted @ 2019-11-09 23:47 itdef 阅读(276) 评论(0) 推荐(0)
上一页 1 ··· 82 83 84 85 86 87 88 89 90 ··· 125 下一页

导航