码迷,mamicode.com
首页 >  
搜索关键字:ret    ( 30742个结果
[Two Sigma OA] Longest Chain
题目: http://www.1point3acres.com/bbs/thread-131978-1-1.html 实现: ...
分类:其他好文   时间:2017-10-03 10:38:52    阅读次数:201
循环队列的复习
struct MyQueue { //循环队列需要少用一个 int que[1000000], head, tail, MXSIZE; void init() { MXSIZE = 1000000; // 1e6 head = tail = 0; } bool isEmpty() { return ...
分类:其他好文   时间:2017-10-03 10:34:26    阅读次数:129
131. Palindrome Partitioning
Given a string s, partition s such that every substring of the partition is a palindrome. Return all possible palindrome partitioning of s. For exampl ...
分类:其他好文   时间:2017-10-03 00:52:13    阅读次数:157
获取tranform参数函数的封装
平时我们都会去获取元素的各种属性值,例如宽高等等的值!但是tranform是个让人很头疼的点,获取出来的是矩阵,耐何线性代数学的并不是那么6啊。 解决方法的思路:只能采取有点取巧的方法,在我们设置的时候把它记录一下,然后在通过这个函数去获取出之前设置的transform相关的值,再也不用去依靠浏览器 ...
分类:其他好文   时间:2017-10-03 00:50:25    阅读次数:175
PAT1008:Elevator
1008. Elevator (20) 时间限制 400 ms 内存限制 65536 kB 代码长度限制 16000 B 判题程序 Standard 作者 CHEN, Yue 时间限制 400 ms 时间限制 400 ms 内存限制 65536 kB 内存限制 65536 kB 代码长度限制 160 ...
分类:其他好文   时间:2017-10-02 23:52:55    阅读次数:376
[LeetCode] Remove Duplicates from Sorted Array
Given a sorted array, remove the duplicates in place such that each element appear only once and return the new length. Do not allocate extra space fo ...
分类:其他好文   时间:2017-10-02 23:47:01    阅读次数:250
正则表达式之你不知道的replace
我们都知道js内置类String提供了一个replace方法,可以把指定字符串替换为另一个字符串,他的基础用法如下: replace方法第一个参数还可以是一个正则表达式: 今天我要说的重点是他的第二个参数,第二个参数其实是一个函数,只不过我们通常采用了简写模式,简单的写了一个返回值,实际上他的原理是 ...
分类:其他好文   时间:2017-10-02 23:09:44    阅读次数:235
C语言库函数的实战之一
//-1:strtok()函数 #include #include int main(void) { char buf[]="hello#world#today";//即将被分割的字符串 char *temp = strtok(buf,"#"); while(temp) { printf("%s "... ...
分类:编程语言   时间:2017-10-02 20:53:45    阅读次数:232
bzoj2815 灾难
我们需要建立一个叫灭绝树的东西,灭绝树,顾名思义,就是树上的一个节点的灭绝会且仅会导致以它为根的子树的灭绝。 如果我们把这颗树建立出来,那么只需要跑一遍dfs求子树大小就可以解决这道题。 那么怎么建这个灭绝树呢。 我们先拓扑排序,按照拓扑序区建树,一个动物可以吃的所有动物(在灭绝树上)的lca就是他 ...
分类:其他好文   时间:2017-10-02 20:52:40    阅读次数:150
算法笔记--快读(输入外挂)模板
inline int read(){ int s=0,w=1; char ch=getchar(); while(ch'9'){if(ch=='-')w=-1;ch=getchar();} while(ch>='0'&&ch<='9') s=s*10+ch-'0',ch=getchar(); ret... ...
分类:编程语言   时间:2017-10-02 20:19:57    阅读次数:132
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!