首先看到Distinct 肯定会想当然的直接.Distinct() 这样调用。 需要知道这里的Distinct 是以对象为单位来去重的。当你Select new 映射的时候就算属性值相同也不会进行去重。 单列的使用这里就略过使用了 多列的使用(比如我需要去重KeyValuePairModel 这个对 ...
分类:
其他好文 时间:
2020-02-24 18:56:48
阅读次数:
75
基本思想关键点详见 “数据结构典型问题” #include<iostream> #include<stdlib.h> #include<stdio.h> #include<vector> #include<string> #include<math.h> #include<algorithm> #i ...
分类:
其他好文 时间:
2020-02-24 10:04:14
阅读次数:
73
第七章、高级数据库查询 内容提要: 1. 掌握一般数据查询功能扩展 2. 掌握查询的并、交、差运算 3.掌握子查询的使用 4.了解其他一些查询功能 第一节 一般数据查询功能扩展 1.1. SELECT语句 1.2.使用TOP限制结果集 TOP n [percent][WITH TIES] ? Top ...
分类:
数据库 时间:
2020-02-24 10:02:03
阅读次数:
111
题目:https://leetcode-cn.com/problems/is-subsequence/ 给定字符串 s 和 t ,判断 s 是否为 t 的子序列。 你可以认为 s 和 t 中仅包含英文小写字母。字符串 t 可能会很长(长度 ~= 500,000),而 s 是个短字符串(长度 <=10 ...
分类:
其他好文 时间:
2020-02-24 09:18:27
阅读次数:
76
Given an integer n, return all distinct solutions to the n-queens puzzle. Each solution contains a distinct board configuration of the n-queens' place ...
分类:
其他好文 时间:
2020-02-23 09:44:19
阅读次数:
57
Return the number of distinct non-empty substrings of text that can be written as the concatenation of some string with itself (i.e. it can be written ...
分类:
其他好文 时间:
2020-02-22 14:02:12
阅读次数:
83
1.说明 sql如下: SELECT COUNT(DISTINCT t.contract_id) FROM `plm`.`t_plm_contract_monitor` t WHERE 1=1 ANd (t.whole_id_one in ( 77 ) or t.whole_id_five in ( ...
分类:
其他好文 时间:
2020-02-21 19:56:22
阅读次数:
350
题目链接 题意 考虑全体不超过 $N$ 位的(非空)01串,(为了题解写得方便)其全体集合记为 $U$. 给定 $U$ 的子集 $S$, 求 $U$ 有多少元素满足它是 $S$ 中至少 $K$ 个串的子序列。 保证 $N \le 20$, $K \le |S|$. 题解 先考虑如何判定字符串 $s$ ...
分类:
其他好文 时间:
2020-02-21 12:53:37
阅读次数:
70
Given a string, we need to find the total number of its distinct substrings. 给你一个字符中,统计有多少个不同的子串InputT- number of test cases. T<=20;Each test case con ...
分类:
其他好文 时间:
2020-02-20 19:55:37
阅读次数:
59