上一页 1 ··· 93 94 95 96 97 98 99 100 101 ··· 125 下一页

2019年5月1日

摘要: LEETCODE 1031. 两个非重叠子数组的最大和 给出非负整数数组 A ,返回两个非重叠(连续)子数组中元素的最大和,子数组的长度分别为 L 和 M。(这里需要澄清的是,长为 L 的子数组可以出现在长为 M 的子数组之前或之后。) 从形式上看,返回最大的 V,而 V = (A[i] + A[i 阅读全文
posted @ 2019-05-01 14:19 itdef 阅读(188) 评论(0) 推荐(0)

2019年4月17日

摘要: http://contest-hunter.org:83/ 题库 github https://github.com/lydrainbowcat/tedukuri www.acwing.com 阅读全文
posted @ 2019-04-17 21:35 itdef 阅读(230) 评论(0) 推荐(0)

2019年4月13日

摘要: 来源 https://www.bilibili.com/video/av42947553 advance 二分查找 bst dp 敲黑板 重点 图 graph 查找 search 很多都和DP吻合? 树 阅读全文
posted @ 2019-04-13 21:56 itdef 阅读(293) 评论(0) 推荐(0)

2019年1月24日

摘要: zt https://programming.iteye.com/blog/1491470 https://blog.csdn.net/abc1234679/article/details/79458376 斗地主AI设计 一、牌型 1 火箭:大小王在一起的牌型,即双王牌,此牌型最大,什么牌型都可以 阅读全文
posted @ 2019-01-24 14:00 itdef 阅读(640) 评论(0) 推荐(0)

2019年1月1日

摘要: 最近没发什么博客了 凑个数 我的leetcode刷题进展 https://gitee.com/def/leetcode_practice 个人以为 刷题在透不在多 前200的吃透了 足以应付非算法岗的绝大多数情况了 阅读全文
posted @ 2019-01-01 10:46 itdef 阅读(215) 评论(0) 推荐(0)

2018年11月11日

摘要: 在学习BT协议中的一个小练习 参考了 https://github.com/airtrack/bitwave 具体B编码解释 可以自行搜索或者参考 这篇文章 bittorrent 学习(一) 种子文件分析与bitmap位图 代码 1 #pragma once 2 #include "pre.h" 3 阅读全文
posted @ 2018-11-11 21:37 itdef 阅读(916) 评论(0) 推荐(0)

2018年11月8日

摘要: 看看 tracker.c文件 http_encode() 为http发送进行编码转换 1 int http_encode(unsigned char *in,int len1,char *out,int len2) 2 { 3 int i, j; 4 char hex_table[16] = "01 阅读全文
posted @ 2018-11-08 14:44 itdef 阅读(395) 评论(0) 推荐(0)
摘要: 原来指望sha1 这种烂大街的算法 不会出什么幺蛾子 结果《linux C编程实战Code》bt章节的sha1 代码 我在linux和windows下的结果不一样 然后用了哈希工具查看了下 发现结果也不一样。 windows和linux自带工具是一致的,但是和《linux C编程实战Code》的代码 阅读全文
posted @ 2018-11-08 10:32 itdef 阅读(1558) 评论(0) 推荐(0)

2018年11月2日

摘要: msg.c中 int转化 char[4] char[4]转化int的函数 如下(有多种方案) 1 int int_to_char(int i, unsigned char c[4]) 2 { 3 c[3] = i % 256; 4 c[2] = (i - c[3]) / 256 % 256; 5 c 阅读全文
posted @ 2018-11-02 13:50 itdef 阅读(374) 评论(0) 推荐(0)

2018年11月1日

摘要: 代码中的log.h log.c比较简单 void logcmd() 记录命令 int logfile();运行日志的记录 int init_logfile() 开启log文件 源码比较清晰也很简单。 可以直接看代码 // peer代码中 我们先来看看结构体 1 typedef struct _Req 阅读全文
posted @ 2018-11-01 10:11 itdef 阅读(513) 评论(0) 推荐(0)
上一页 1 ··· 93 94 95 96 97 98 99 100 101 ··· 125 下一页

导航