http://acm.hdu.edu.cn/showproblem.php?pid=6754 题意: 字符串由小写字母构成 求 长度为N的 回文子串数量最少的 字符串的个数 思路: 长度为1的串 回文子串最少1个 形式:a 长度为2的串 回文子串最少2个 形式:aa / ab 长度为3的串 回文子串 ...
分类:
其他好文 时间:
2020-07-26 00:24:53
阅读次数:
55
一、Python通过PyMongo库实现对MongoDB的使用 代码: From pymongo import MongoClient # 链接mongodb数据库并初始化数据库 方式一: Client = MongoClient (‘mongodb://usr:password@uri’) 例:( ...
分类:
数据库 时间:
2020-07-26 00:02:09
阅读次数:
73
1、给一个person表,有id,email,查找不重复的按照id排序 Select distinct email from person order by asc ...
分类:
数据库 时间:
2020-07-23 18:55:40
阅读次数:
84
1.评估oracle 数据库rman 全备的大小: SQL> select sum(bytes)/1024/1024 from v$datafile; SUM(BYTES)/1024/1024 990SQL> select sum(bytes)/1024/1024 from dba_free_spa ...
分类:
数据库 时间:
2020-07-23 15:43:07
阅读次数:
131
做完前四题还有一个半小时... 比赛链接:https://codeforces.com/contest/1382 A. Common Subsequence 题意 给出两个数组,找出二者最短的公共子序列。 题解 最短即长为一。 代码 #include <bits/stdc++.h> using na ...
分类:
其他好文 时间:
2020-07-22 11:10:39
阅读次数:
89
https://leetcode-cn.com/problems/longest-increasing-subsequence/ 1、题目: 给定一个无序的整数数组,找到其中最长上升子序列的长度。 示例: 输入: [10,9,2,5,3,7,101,18]输出: 4 解释: 最长的上升子序列是 [2 ...
分类:
其他好文 时间:
2020-07-19 23:31:12
阅读次数:
70
SELECT DISTINCT t2.xm_code,t2.xm_desc,t2.xm_contact,t3.user_email FROM xm_main t2 LEFT JOIN xm_agree_zb t1 ON t2.xm_code =t1.xm_code LEFT JOIN portal. ...
分类:
其他好文 时间:
2020-07-17 19:50:28
阅读次数:
137
List<int> lstHashCode = (from d in dtEquipInfo.AsEnumerable() select d.Field<int>("hashcode")).Distinct().ToList(); 其中dtEquipInfo是一个带有hashcode列的DataTa ...
分类:
其他好文 时间:
2020-07-16 22:00:28
阅读次数:
114
题意:E、Maximum Subsequence Value 题意: 给你n 个元素,你挑选k个元素,那么这个 k 集合的值为 ∑2i,其中,若集合内至少有 max(1,k?2)个数二进制下第 i 位为 1,则第 i 位有效,求一个集合可以得到的最大值。 题解: 应该是一种贪心 当k==3的时候,那 ...
分类:
其他好文 时间:
2020-07-16 12:01:31
阅读次数:
44
problem 1380. Lucky Numbers in a Matrix 在矩阵中,如果一个数既是它所在行的最小值,又是它所在列的最大值,则称这个数为幸运数。找到矩阵中所有的幸运数。 Constraints All elements in the matrix are distinct. so ...
分类:
其他好文 时间:
2020-07-16 00:15:33
阅读次数:
72