码迷,mamicode.com
首页 >  
搜索关键字:median of two sor    ( 12209个结果
第二次过程性考核
码云地址:https://gitee.com/lixin-123/16012014_li_xin_hun_two 7-1 学生类-构造函数 定义一个有关学生的Student类,内含类成员变量: String name、String sex、int age,所有的变量必须为私有(private)。 1 ...
分类:其他好文   时间:2018-10-13 12:09:42    阅读次数:181
P1638 逛画展
two pointers练习题。 这道题求的是一个最短的区间长度,满足其中所有的数字都出现。 暴力的做法是两次枚举,复杂度$O(n^2)$。 更优美的是尺取法,英文名叫two pointers。(两个指针。。。) 算法大概的过程是这样的: 其实真的是很优美的,代码也很短。 希望我能真的学会吧。。。 ...
分类:其他好文   时间:2018-10-13 02:36:11    阅读次数:116
CF601A 【The Two Routes】
看数据范围,然后果断邻接矩阵$Floyd$啊对于公路和铁路,各建一个图,分别跑最短路,然后取最大值即可 ...
分类:其他好文   时间:2018-10-12 21:21:47    阅读次数:144
CF1042F Leaf Sets
CF1042F Leaf Sets 题意翻译 给定一棵$n$个点的树,将叶子节点分为数个集合使集合里点对最长距离不超过$k$,求最少集合数。 输入输出格式 输入格式: The first line contains two integers $n$ and $k$ ( $3 \le n \le 10 ...
分类:其他好文   时间:2018-10-12 16:08:50    阅读次数:166
Class__Two
今天老师要求做查找英文文章中最高频的词 文章用文本储存 import java.io.BufferedReader;import java.io.File;import java.io.FileInputStream;import java.io.IOException;import java.io ...
分类:其他好文   时间:2018-10-12 01:22:44    阅读次数:167
PAT-甲级-1001-A+B for Polynomials
This time, you are supposed to find A+B where A and B are two polynomials. Input Specification: Each input file contains one test case. Each case occu ...
分类:其他好文   时间:2018-10-12 01:19:28    阅读次数:153
350. Intersection of Two Arrays II
Given two arrays, write a function to compute their intersection. Example 1: Example 2: Input: nums1 = [4,9,5], nums2 = [9,4,9,8,4] Output: [4,9] Exam ...
分类:其他好文   时间:2018-10-11 19:36:46    阅读次数:163
242. Valid Anagram
Given two strings s and t , write a function to determine if t is an anagram of s. Example 1: Example 2: Note:You may assume the string contains only ...
分类:其他好文   时间:2018-10-11 15:44:25    阅读次数:181
13. Roman to Integer
Roman numerals are represented by seven different symbols: I, V, X, L, C, D and M. For example, two is written as II in Roman numeral, just two one's ...
分类:其他好文   时间:2018-10-11 15:13:35    阅读次数:134
653. Two Sum IV - Input is a BST
Given a Binary Search Tree and a target number, return true if there exist two elements in the BST such that their sum is equal to the given target. E ...
分类:其他好文   时间:2018-10-11 12:58:51    阅读次数:181
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!