码迷,mamicode.com
首页 >  
搜索关键字:turn    ( 27138个结果
python练习代码
排序 lst = [5,10,2,4,8,1]def sort(item,reverse=False): ret = [] for i in item: for x,y in enumerate(ret): #[10,5] flage=i>y if reverse else i<y if flage ...
分类:编程语言   时间:2020-01-13 21:52:56    阅读次数:104
高精度加法 C++版本
AcWing 791 高精度加法 https://www.acwing.com/problem/content/description/793/ #include <iostream> #include <cstdio> #include <algorithm> #include <string> ...
分类:编程语言   时间:2020-01-13 20:21:15    阅读次数:102
20. 有效的括号(栈的使用)
题目描述:括号(小括号、中括号、大括号)的匹配 传送门:https://leetcode-cn.com/problems/valid-parentheses/ 解法:《数据结构》中作为例子引出栈的概念。用一个栈维护,从左到右扫描目标字符串,如果括号匹配,即满足三种情况: ①、s[i] == ')' ...
分类:其他好文   时间:2020-01-13 20:19:49    阅读次数:95
Kmp算法浅谈
Kmp算法浅谈 一.Kmp算法思想 在主串和模式串进行匹配时,利用next数组不改变主串的匹配指针而是改变模式串的匹配指针,减少大量的重复匹配时间。在Kmp算法中,next数组的构建是整个Kmp算法的核心所在。 二.Kmp核心之next数组的构建 (1)前缀,后缀的定义 (2)最长公共前后缀定义 ( ...
分类:编程语言   时间:2020-01-13 20:16:20    阅读次数:90
set基本运用
```/* set集合基本用法 */#include#includeusing namespace std;//seta; void IteratorUsage()seta;int main(){ //T n; //sample //插入 int n; a.insert(n); //删除 a.era... ...
分类:其他好文   时间:2020-01-13 19:41:48    阅读次数:69
How can I manually create a authentication cookie instead of the default method?
How can I manually create a authentication cookie instead of the default method? Here you go. ASP.NET takes care of this for you when you use the high ...
分类:其他好文   时间:2020-01-13 19:40:44    阅读次数:85
java 记录数据持续变化时间
1.需求:获取count为null和不为null的持续变化 [{count=0, time=0}, {count=10, time=1000}, {count=20, time=2000}, {count=30, time=3000}, {count=40, time=4000}, {count=n ...
分类:编程语言   时间:2020-01-13 18:20:08    阅读次数:115
luogu P4366 [Code+#4]最短路 |最短路
题目描述 企鹅国中有 NNN 座城市,编号从 111 到 NNN 。 对于任意的两座城市 iii 和 jjj ,企鹅们可以花费 (i xor j)×C(i~\mathrm{xor}~j) \times C(i xor j)×C 的时间从城市 iii 走到城市 jjj ,这里 CCC 为一个给定的常数 ...
分类:其他好文   时间:2020-01-13 17:57:19    阅读次数:77
C++中使用scanf(); printf();然后记事本运行
1.创建 hello.cpp 2.输入 #include <stdio.h> int main(){ int a; char c; printf("hello word!"); scanf("%s",&c); printf("输入了:%s",&c); scanf("%d", &a); return ...
分类:编程语言   时间:2020-01-13 17:54:58    阅读次数:95
递推 +二项式定理(矩阵快速幂)
https://nanti.jisuanke.com/t/A2060 题意:第一个数为f[1] = a ,f[2] = b . 递推式:f[n] = f[n-1] + 2*f[n-2] + n4 . 求f[n]%2147493647. 数据:N,a,b<231 #include<stdio.h> # ...
分类:其他好文   时间:2020-01-13 16:36:40    阅读次数:118
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!