码迷,mamicode.com
首页 >  
搜索关键字:jump game ii    ( 12386个结果
写函数接受参数,判断并运行文件
import osdef func(path): if os.path.isfile(path): if path.endswith(".py"): os.system("python %s" % path) elif os.path.isdir(path): list_num = os.listd ...
分类:其他好文   时间:2020-02-03 12:05:40    阅读次数:61
1.game.h
game.h ...
分类:其他好文   时间:2020-02-03 12:03:34    阅读次数:65
[leetcode]Word Search II
用了前缀集合,高级的可以用前缀树 class Solution: def findWords(self, board: List[List[str]], words: List[str]) -> List[str]: if len(board) == 0 or len(board[0]) == 0: ...
分类:其他好文   时间:2020-02-03 09:45:19    阅读次数:90
Educational Codeforces Round 73
唉,又是掉分的一场比赛... A. 2048 Game 题意:给出一个数组,问能不能通过一系列操作(将数组中的两个数相加变成另一个数),使得数组中包含2048,数组中的数全是2的指数,可以则输出YES 思路:只要有两个数比2048小且一样,则合并,直至不存在两个数一样且比2048小,之后看看数组中是 ...
分类:其他好文   时间:2020-02-02 23:20:29    阅读次数:74
算法复习:双指针(对撞指针、快慢指针)
一、快慢指针: leedcode 142. 环形链表 II 快慢指针的思想是设置慢指针slow和快指针fast,slow每次走一步,fast每次走两步,如果有环fast指针和slow指针必然相遇,相遇时 定义新的指针p从head开始和slow从当前位置起每次都走一步,直到相遇,相遇的位置就是环的入口 ...
分类:编程语言   时间:2020-02-02 22:02:24    阅读次数:127
ucos-ii 2.52信号量的小结
这里结合任哲的书籍+源代码来分析信号量1、在任哲的书中,提到信号量只有普通的信号量,没有区分freertos所谓的二值信号量和计数信号量。可以看看源代码,ucos的代码风格是很不错的,个人认为这个风格比freertos好,看起来很舒服,不像freertos一大堆宏定义。可以看到,OSSemCreat ...
分类:其他好文   时间:2020-02-02 16:01:14    阅读次数:111
leetcode 445. Add Two Numbers II
题目内容 You are given two non empty linked lists representing two non negative integers. The most significant digit comes first and each of their nodes c ...
分类:其他好文   时间:2020-02-02 15:26:42    阅读次数:87
3.4面向对象封装案例2士兵突击
面向对象封装案例 II 目标 士兵突击案例 身份运算符 封装 封装 是面向对象编程的一大特点 面向对象编程的 第一步 —— 将 属性 和 方法 封装 到一个抽象的 类 中 外界 使用 类 创建 对象,然后 让对象调用方法 对象方法的细节 都被 封装 在 类的内部 一个对象的 属性 可以是 另外一个类 ...
分类:其他好文   时间:2020-02-02 13:34:35    阅读次数:77
LeetCode Solution-82
82. Remove Duplicates from Sorted List II Given a sorted linked list, delete all nodes that have duplicate numbers, leaving only distinct numbers from ...
分类:其他好文   时间:2020-02-02 12:06:41    阅读次数:68
Parity game POJ - 1733 带权并查集
#include<iostream> #include<algorithm> #include<cstdio> using namespace std; const int N=10010<<1; struct node { int l,r,ans; } q[N]; int a[N],fa[N],d ...
分类:其他好文   时间:2020-02-01 21:18:27    阅读次数:74
12386条   上一页 1 ... 84 85 86 87 88 ... 1239 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!