题目描述查找一个数组的第K小的数,注意同样大小算一样大。 如 2 1 3 4 5 2 第三小数为3。 输入描述:输入有多组数据。每组输入n,然后输入n个整数(1<=n<=1000),再输入k。 输出描述:输出第k小的...
题解
题目描述第一行输入一个数,为n,第二行输入n个数,这n个数中,如果偶数比奇数多,输出NO,否则输出YES。 输入描述:输入有多组数据。每组输入n,然后输入n个整数(1<=n<=1000)。 输出描述:如果偶数比奇数多,...
题目描述哈夫曼树,第一行输入一个数n,表示叶结点的个数。需要用这些叶结点生成哈夫曼树,根据哈夫曼树的概念,这些结点有权值,即weight,题目需要输出所有结点的值与权值的乘积之和。 输入描述:输入有多组数据。每组第一行输入一个数n,...
题目描述大家都知道,数据在计算机里中存储是以二进制的形式存储的。 有一天,小明学了C语言之后,他想知道一个类型为unsigned int 类型的数字,存储在计算机中的二进制串是什么样子的。 你能帮帮小明吗?并且,小明不想要二进制串中前...
问题描述There are two sorted arrays nums1 and nums2 of size m and n respectively. Find the median of the two sorted array...
问题描述 Given a string, find the length of the longest substring without repeating characters. (找出最长的没有重复字母出现的子串。...
问题描述You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse...
Description Given an array of integers, return indices of the two numbers suchthat they add up to a specific target. ...