码迷,mamicode.com
首页 >  
搜索关键字:ret    ( 30742个结果
序列化
序列化 a. 两种方式 b. 由于json.dumps时无法处理datetime日期,所以可以通过自定义处理器来做扩展,如: #每个字段都会验证一遍,都会执行default函数 import json from datetime import date from datetime import da ...
分类:其他好文   时间:2017-08-04 20:30:46    阅读次数:129
HDU - 3499 Flight 双向SPFA+枚举中间边
Flight Recently, Shua Shua had a big quarrel with his GF. He is so upset that he decides to take a trip to some other city to avoid meeting her. He wi ...
分类:其他好文   时间:2017-08-04 19:41:34    阅读次数:146
odb_sqlite_demo
from:https://github.com/joseprous/odb-sqlite-test/blob/master/driver.cpp ...
分类:数据库   时间:2017-08-04 19:34:28    阅读次数:398
OJ刷题---简单password破解
题目要求: 输入代码: #include<iostream> #include <cstdio> #include <cstring> using namespace std; int main() { char str[100]; int i; gets(str); i=0; while(str[ ...
分类:其他好文   时间:2017-08-04 19:33:14    阅读次数:133
LCA 最近公共祖先 (模板)
1 #include 2 #include 3 #include 4 #include 5 #define N 100005 6 using namespace std; 7 vector vec[N] ; 8 vector > query[N]; 9 struct node{ 10 int fir... ...
分类:其他好文   时间:2017-08-04 19:29:15    阅读次数:108
统计回文子序列(动态规划)
dp[i][j]代表区间[ i , j ]中回文子序列的个数…… #include <cstdio> #include <cstring> #include <iostream> #include <algorithm> #define MOD 100007 using namespace std; ...
分类:其他好文   时间:2017-08-04 19:28:02    阅读次数:158
2722:和数
题目链接:http://noi.openjudge.cn/ch0201/2722/ 给定一个正整数序列,判断其中有多少个数,等于数列中其他两个数的和。 比如,对于数列1 2 3 4, 这个问题的答案就是2, 因为3 = 2 + 1, 4 = 1 + 3。 算法分析:注意利用下标。 ...
分类:其他好文   时间:2017-08-04 18:28:05    阅读次数:212
获取n天后的日期
getDateAfter_n(days){ let date = new Date(); date.setDate(date.getDate() + days); let yearStr = date.getFullYear(); let monthStr = ("0"+(date.getMonth ...
分类:其他好文   时间:2017-08-04 18:22:17    阅读次数:109
八大排序算法的python实现(八)简单选择排序
代码: 这个算法更简单了,记住三个字:打擂台。 时间复杂度O(n ** 2) 空间复杂度O(1) 不稳定算法。 记住四个稳定排序算法:直接插入排序、冒泡排序、二路归并排序、基数排序。剩下都是不稳定的。 ...
分类:编程语言   时间:2017-08-04 18:18:18    阅读次数:124
[BZOJ 2749] 外星人
题意 给定 $n = \prod_{k = 1} ^ m {p_k} ^ {q_k}$ . 求最小的 x , 使得 $\phi^x(n) = 1$ . $1 \le p_k \le {10} ^ 5$ . $1 \le q_k \le {10} ^ 9$ . 分析 设 $$R(n) = \min_{ ...
分类:其他好文   时间:2017-08-04 17:14:48    阅读次数:116
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!