码迷,mamicode.com
首页 >  
搜索关键字:eat    ( 649个结果
函数的链式调用实现Man().sleep().eat()
let index = 0; let stack = []; function next() { let fn = stack[index]; index++; if(typeof fn === 'function'){ fn(); } } function fn1() { console.log(... ...
分类:其他好文   时间:2018-10-09 00:42:00    阅读次数:623
49.Group Anagrams(sorted,dict)
Given an array of strings, group anagrams together. Example: Input: ["eat", "tea", "tan", "ate", "nat", "bat"], Output: [ ["ate","eat","tea"], ["nat", ...
分类:其他好文   时间:2018-10-08 13:29:08    阅读次数:142
vc++如何创建程序-构造和继承
#include<iostream.h>//定义一个动物类class Animal{public: void eat();//添加方法 { cout<<"animal eat"<<endl; } void sleep();//添加方法 { cout<<"animal sleep"<<endl; } ...
分类:编程语言   时间:2018-10-01 21:42:18    阅读次数:181
不同类中self的传递
1 # 不同类中self的传递 2 3 class Foo(object): 4 def __init__(self, config): # config是Cat中的self 5 self.config = config 6 7 def eat(self): 8 print(self.config.... ...
分类:其他好文   时间:2018-10-01 11:56:24    阅读次数:139
抽象类
import abc class Animal(metaclass=abc.ABCMeta): @abc.abstractmethod #强制子类 def eat(self): pass @abc.abstractmethod def run(self): pass class Peeple(Animal): def eat(self): print(‘peeple is eating‘) def run(self): print(‘peeple is runing‘) class Dag(Animal): def eat(self): print(‘dag is eating‘) def run(self): print(‘dag is runing‘) peo1=Peeple() dag1=Dag() peo1.eat() dag1.eat()
分类:其他好文   时间:2018-09-25 22:55:54    阅读次数:182
[leetcode][49] Group Anagrams
49. Group Anagrams Given an array of strings, group anagrams together. Example: Input: ["eat", "tea", "tan", "ate", "nat", "bat"], Output: [ ["ate","e ...
分类:其他好文   时间:2018-09-17 21:29:05    阅读次数:205
焦作网络赛L-Poor God Water【矩阵快速幂】
God Water likes to eat meat, fish and chocolate very much, but unfortunately, the doctor tells him that some sequence of eating will make them poisono ...
分类:其他好文   时间:2018-09-17 11:45:18    阅读次数:307
ACM-ICPC 2018 焦作赛区网络预赛 E Jiu Yuan Wants to Eat (树链剖分+线段树)
题目链接:https://nanti.jisuanke.com/t/31714 题意:给你一棵树,初始全为0,有四种操作: 1.u-v乘x 2.u-v加x 3. u-v取反 4.询问u-v的和 思路: 除去第三个操作就是很简单的树链剖分+线段树多重标记下放,所以我们只要考虑怎么维护第三个操作就好了, ...
分类:其他好文   时间:2018-09-15 23:25:49    阅读次数:240
ACM-ICPC 2018 焦作赛区网络预赛 E. Jiu Yuan Wants to Eat
分析 除了树剖没想到其他解法。 用线段树维护区间和,同时针对修改区间修改操作建立两个lazy标记,一个是$lazy_{mul}$,另一个是$lazy_{add}$,代表区间里的数都需要先乘以$lazy_{mul}$,再加上$lazy_{add}$。如果一个区间需要被重复标记,那么我们可以先把新的la ...
分类:其他好文   时间:2018-09-15 21:19:04    阅读次数:168
ACM-ICPC 2018 焦作赛区网络预赛 L 题 Poor God Water
God Water likes to eat meat, fish and chocolate very much, but unfortunately, the doctor tells him that some sequence of eating will make them poisono ...
分类:其他好文   时间:2018-09-15 20:08:10    阅读次数:239
649条   上一页 1 ... 16 17 18 19 20 ... 65 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!