点击打开链接
题意:给n个人和许多关系,问能够匹配的人数和匹配的人
思路:据说是带花树的模版题,来练一练,原理什么的根本不是本弱可以理解的,权当是一个模版直接用算了,就像最大流一样,而且据本弱做的一些弱题发现这种题目考验的是建图的能力,也就是上边的所有的模版几乎不会动,然后直接建好图就行了,说白了就是太弱看不懂原理直接当模版使了#include
#include
#include
#in...
分类:
其他好文 时间:
2016-06-12 02:32:00
阅读次数:
190
题目链接:点击打开链接
思路:用d[i][j][k]表示前i个, 已经占据了第一层j厚度,第二层k厚度的最小高度。 转移即可。 这题卡常数挺恶心的, 要加点恶心的优化。
细节参见代码:
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#inc...
分类:
其他好文 时间:
2016-06-12 02:28:56
阅读次数:
148
题目描述
输入一棵二叉树,求该树的深度。从根结点到叶结点依次经过的结点(含根、叶结点)形成树的一条路径,最长路径的长度为树的深度。
代码:
public class Solution {
public int TreeDepth(TreeNode pRoot){
if(pRoot==null)
return 0;
retur...
分类:
其他好文 时间:
2016-06-12 02:31:25
阅读次数:
127
STM32的FSMC真是一个万能的总线控制器,不仅可以控制SRAM,NOR FLASH,NAND FLASH,PC Card,还能控制LCD,TFT.
不过有时候它也很诡异.如
*(volatile uint16_t *)0x60400000=0x0; // 实际是写入A21=1,而非A22....
分类:
其他好文 时间:
2016-06-12 02:30:12
阅读次数:
479
1.安装samba(rpm包安装) 首先,检查一下系统中有没有安装samba的RPM包。输入rpm -qa|grep samba没有显示,则表示samba没有安装。
输入yum install samba-3.5.10-125.el6.i686.rpm安装samba
samba安装完成!2.samba相关配置文件(这部分内容来自鸟哥的私房菜)
与samba服务器相关的配置文件有:
/...
分类:
系统相关 时间:
2016-06-12 02:31:05
阅读次数:
504
Combination Sum III
Total Accepted: 34119 Total
Submissions: 93255 Difficulty: Medium
Find all possible combinations of k numbers that add up to a number n, given that only...
分类:
其他好文 时间:
2016-06-12 02:28:31
阅读次数:
151
进入6月,微软全球CEO Satya Nadella与ARM全球CEO Simon Segars先后现身中国。背后的时代大背景是,一个人工智能、虚拟现实、SaaS服务所代表技术新纪元已经进入最后一公里,高能量人物正在开踢这临门一脚。...
分类:
其他好文 时间:
2016-06-12 02:27:57
阅读次数:
160
Find Minimum in Rotated Sorted Array II
Total Accepted: 52722 Total
Submissions: 152155 Difficulty: Hard
Follow up for "Find Minimum in Rotated Sorted Array":
What if dupl...
分类:
其他好文 时间:
2016-06-12 02:29:39
阅读次数:
139
Combination Sum
Total Accepted: 95000 Total
Submissions: 302249 Difficulty: Medium
Given a set of candidate numbers (C) and a target number (T), find all unique combinations...
分类:
其他好文 时间:
2016-06-12 02:30:13
阅读次数:
164
Java源码之LinkedList
转载请注意出处:
一、LinkedList概述
本文采用jdk1.8进行分析。
LinkedList实现了List,Deque接口的双向链表,实现了链表的所有可选操作,并且可有null值。查找某个值的时候必须从头到尾的遍历链表。它是非线程安全的,当多个线程结构化修改同一链表时需要加上同步处理。(程结构化修改包括:添加、...
分类:
编程语言 时间:
2016-06-12 02:30:00
阅读次数:
255
Combination Sum II
My Submissions
Question
Editorial Solution
Total Accepted: 71124 Total
Submissions: 254398 Difficulty: Medium
Given a collection of candidate numbers (C) and a...
分类:
其他好文 时间:
2016-06-12 02:29:17
阅读次数:
125
How Many Tables
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)
Total Submission(s): 23012 Accepted Submission(s): 11485
Problem Description
Today is...
分类:
其他好文 时间:
2016-06-12 02:28:42
阅读次数:
170
opengGL相关库的配置,包括glew、freeglut、GLTools、GLM...
分类:
其他好文 时间:
2016-06-12 02:29:59
阅读次数:
692
这篇文章不仅仅讨论如何使用Go构建RESTful的JSON API,同时也会讨论如何设计好的RESTful API。如果你曾经遭遇了未遵循良好设计的API,那么你最终将写烂代码来使用这些垃圾API。希望阅读这篇文章后,你能够对好的API应该是怎样的有更多的认识。JSON API是啥?在JSO...
gitlab+gerrit+jenkins的CI环境搭建...
分类:
其他好文 时间:
2016-06-12 02:26:50
阅读次数:
555
部分转载自:陈皓
GDB中应该知道的几个调试方法
here
知识储备
一般来说GDB主要调试的是C/C++的程序。要调试C/C++的程序,首先在编译时,我们必须要把调试信息加到可执行文件中。使用编译器(cc/gcc/g++)的 -g 参数可以做到这一点。如:
> cc -g hello.c -o hello
> g++ -g hello.cpp -o hello...
分类:
数据库 时间:
2016-06-12 02:28:47
阅读次数:
262
题目链接:https://leetcode.com/problems/isomorphic-strings/
题目:
Given two strings s and t, determine if they are isomorphic.
Two strings are isomorphic if the characters in s can be replaced to ge...
分类:
其他好文 时间:
2016-06-12 02:29:06
阅读次数:
145