题目链接:https://nanti.jisuanke.com/t/19979 题意:给出一个 n 个点,m 条边的 DAG,选出最大的子集使得其中结点两两不能到达。 题解:参考自:https://blog.csdn.net/winter2121/article/details/79849472 首 ...
分类:
其他好文 时间:
2018-10-04 23:56:53
阅读次数:
258
一、引用 MySql.Data.EntityFrameworkCore:8.0.12 二、连接字符串 将所有系统连接字符串统一放在数据库中,应用中仅保留一个连接字符串,方便维护。 底层使用了EF,所以只要根据配置动态生成数据库连接字符串,就可以随意切换数据库类型。(此功能预留,暂时懒得) 1 pub ...
分类:
数据库 时间:
2018-10-04 12:55:52
阅读次数:
173
Given an unsorted array, find the maximum difference between the successive elements in its sorted form. Return 0 if the array contains less than 2 el ...
分类:
其他好文 时间:
2018-10-04 11:24:37
阅读次数:
170
In a given array nums of positive integers, find three non-overlapping subarrays with maximum sum. Each subarray will be of size k, and we want to max ...
分类:
移动开发 时间:
2018-10-04 10:08:35
阅读次数:
174
思路:多写几个数会发现,只有n%3==0和n%4==0的情况下满足题意。 ...
分类:
其他好文 时间:
2018-10-04 10:02:54
阅读次数:
159
滑动控件 添加下面的代码,实现基本功能 override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view, typically from a nib. //设置滑动控 ...
分类:
移动开发 时间:
2018-10-04 09:43:28
阅读次数:
146
Given a n-ary tree, find its maximum depth. The maximum depth is the number of nodes along the longest path from the root node down to the farthest le ...
分类:
编程语言 时间:
2018-10-04 09:19:07
阅读次数:
155
传送门 在看大佬的代码时候遇到了unique函数以及二分查找的lower_bound和upper_bound函数,所以写这篇文章来记录以备复习。 unique函数 在STL中unique函数是一个去重函数, unique的功能是去除相邻的重复元素(只保留一个),其实它并不真正把重复的元素删除,是把重 ...
分类:
其他好文 时间:
2018-10-02 22:34:29
阅读次数:
297
Too Rich http://acm.hdu.edu.cn/showproblem.php?pid=5527 Time Limit: 6000/3000 MS (Java/Others) Memory Limit: 262144/262144 K (Java/Others)Total Submis ...
分类:
其他好文 时间:
2018-10-02 20:43:17
阅读次数:
211
给定三个已知长度的边,确定是否能够构成一个三角形,这是一个简单的几何问题。我们都知道,这要求两边之和大于第三边。实际上,并不需要检验所有三种可能,只需要计算最短的两个边长之和是否大于最大那个就可以了。 这次的问题就是:给出三个正整数,计算最小的数加上次小的数与最大的数之差。 每一行包括三个数据a, ...
分类:
其他好文 时间:
2018-10-02 17:32:48
阅读次数:
186