Leetcode周赛165】的更多相关文章

目录 找出井字棋的获胜者 思路 代码 不浪费原料的汉堡制作方案 思路 代码 统计全为 1 的正方形子矩阵 思路 代码 分割回文串 III 思路 代码 找出井字棋的获胜者 思路 模拟. 代码 class Solution { public: char mp[4][4]; bool check(int x, int y, char ch) { int flag = 1; for(int i = 0; i < 3; ++i) { if(mp[x][i] != ch) flag = 0; } if(fl…
LeetCode 第 165 场周赛 5275. 找出井字棋的获胜者 5276. 不浪费原料的汉堡制作方案 5277. 统计全为 1 的正方形子矩阵 5278. 分割回文串 III C 暴力做的,只能说数据不充分 找出井字棋的获胜者4 题目描述 Description A 和 B 在一个 3 x 3 的网格上玩井字棋. 井字棋游戏的规则如下: 玩家轮流将棋子放在空方格 (" ") 上. 第一个玩家 A 总是用 "X" 作为棋子,而第二个玩家 B 总是用 "…
[LeetCode]165. Compare Version Numbers 解题报告(Python) 标签(空格分隔): LeetCode 作者: 负雪明烛 id: fuxuemingzhu 个人博客: http://fuxuemingzhu.me/ 题目地址:https://leetcode.com/problems/compare-version-numbers/description/ 题目描述: Compare two version numbers version1 and vers…
Contest 111 (题号941-944)(2019年1月19日,补充题解,主要是943题) 链接:https://leetcode.com/contest/weekly-contest-111 [941]Valid Mountain Array(第一题 3分)(google tag) 判断一个数组是不是 Mountain 数组. Mountain 数组的定义是 A.length >= 3There exists some i with 0 < i < A.length - 1 su…
一天一道LeetCode 本系列文章已全部上传至我的github,地址:ZeeCoder's Github 欢迎大家关注我的新浪微博,我的新浪微博 欢迎转载,转载请注明出处 (一)题目 来源: https://leetcode.com/problems/compare-version-numbers/ Compare two version numbers version1 and version2. If version1 > version2 return 1, if version1 <…
题目描述: 给你一份『词汇表』(字符串数组) words 和一张『字母表』(字符串) chars. 假如你可以用 chars 中的『字母』(字符)拼写出 words 中的某个『单词』(字符串),那么我们就认为你掌握了这个单词. 注意:每次拼写时,chars 中的每个字母都只能用一次. 返回词汇表 words 中你掌握的所有单词的 长度之和. 示例 1: 输入:words = ["cat","bt","hat","tree"],…
Contest 41 ()(题号) Contest 42 ()(题号) Contest 43 ()(题号) Contest 44 (2018年12月6日,周四上午)(题号653—656) 链接:https://leetcode.com/contest/leetcode-weekly-contest-44 比赛情况记录:就做出来两题,第三题不难,然而就是在算坐标的时候卡住了.orz.结果:2/4,ranking:637/2272.第四题没看题,第三题搞得心情不好了orz. [653]Two Sum…
Contest 51 (2018年11月22日,周四早上)(题号681-684) 链接:https://leetcode.com/contest/leetcode-weekly-contest-51 比赛结果记录:3/4,ranking:270/2879.第三题有点类似于图的最小生成树,第四题似乎是很火的种花题(第四题我好像几个月之前做过,有印象,当时也是自己做的). [682]Baseball Game(第一题 3分) You're now a baseball game point reco…
Contest 71 () Contest 72 () Contest 73 (2019年1月30日模拟) 链接:https://leetcode.com/contest/weekly-contest-73 结果:2/4,会做第一题和第三题,第二题和第四题不会做. [788]Rotated Digits(第一题 4分)(谷歌tag) 给了一个 good number 的定义,X is a good number if after rotating each digit individually…
Contest 81 (2018年11月8日,周四,凌晨) 链接:https://leetcode.com/contest/weekly-contest-81 比赛情况记录:结果:3/4, ranking: 440/2797.这次题目似乎比较简单,因为我比赛的时候前三题全做出来了(1:12:39),然后第四题有思路,正在写,没写完,比赛完了写完提交也对了. [821]Shortest Distance to a Character(第一题 4分) 给了一个单词(字符串)s,和单词中的任意一个字母…