• Relative Sort Array

    Relative Sort Array Relative Sort Array Given two arrays arr1 and arr2, the elements of arr2 are distinct, and all elements in arr2 are also in arr1.Sort the elements of arr1 such that the relative ordering of items in arr1 are the same as in arr2....

    2019-08-16 07:51:08 iOSPSmacHTTPS<the字符串COMHTTPexit

  • 二分法(四):采用二分法解决“最大化平均值”问题

    二分法(四):采用二分法解决“最大化平均值”问题 【例1】切绳子。 题目描述 有N条绳子,它们的长度分别为Li。如果从它们中切割出K条长度相同的绳子,这K条绳子每条最长能有多长?答案保留到小数点后2位(直接舍掉2位后的小数)。 输入输出格式 输入格式: 第一行两...

    2019-08-16 07:50:58 IEAV<theCOM解决问题使用程序提交

  • 带毒的水

    带毒的水 带毒的水 Problem Description 有N瓶水,其中只有一瓶有毒,小白鼠只要喝了一点带毒的水24小时 内就会死亡,问至少要多少只小白鼠才能在24小时内鉴别出哪瓶水有毒。 Input 每行一个整数,表示水的瓶数 Output 每行一个整数,表示至少需要小白鼠的数量 Sample...

    2019-08-16 07:50:55 IEPSC++<函数解决问题分析位运算em

  • Longest Substring Without Repeating Characters

    Longest Substring Without Repeating Characters 3.Longest Substring Without Repeating Characters Given a string, find the length of the longest substring without repeating characters. Example 1: Input: abcabcbbOutput: 3 Explanation: The answer is abc...

    2019-08-16 07:50:18 YYiOSPSmacHTTPS<theCOMHTTPexit

  • kuangbin专题专题四 Frogger POJ - 2253

    kuangbin专题专题四 Frogger POJ - 2253 题目链接:https://vjudge.net/problem/POJ-2253 思路: 从一号到二号石头的所有路线中,每条路线中都个子选出该路线中两点通路的最长距离,并在这些选出的最长距离选出最短路的那个距离X, 就是青蛙距离,即青蛙至少能跳X米,...

    2019-08-16 07:50:01 IEiOSPSHTTPS<NET.NET代码HTTP维护

  • 高精度计算(二):大整数乘法

    高精度计算(二):大整数乘法 【例1】两个大整数乘法。 输入两个不超过200位的非负大整数a和b,求ab的值。 (1)编程思路。 用 unsigned num1[200]和num2[200]分别存放两个乘数,用result[400]来存放积。计算的中间结果也都存在result 中。result 长度取400 是因为两...

    2019-08-16 07:49:50 IE3604399timAV<the字符串函数COM

  • 高精度计算(三):大整数和减法(采用“万进制”)

    高精度计算(三):大整数和减法(采用“万进制”) 一般我们称基本数据类型无法表示的整数为大整数。而对于那些精度要求很高的数据通常称为高精度数,或称大数。 表示和存放大数的一个简单的方法就是:用数组存放和表示大数。一个数组元素,存放大数中的一位。 显然,...

    2019-08-16 07:49:34 C++语言定义IE2345iOSC++timAV<the

  • 高精度计算(一):大整数加法

    高精度计算(一):大整数加法 C/C++中的int 类型能表示的范围是-2 31 ~2 31 1。unsigned 类型能表示的范围是 0 ~2 32 1,即 0~4294967295。所以,int 和unsigned 类型变量,都不能保存超过10 位的整数。 有时我们需要参与运算的数,可能会远远不止10 位,例如要求100...

    2019-08-16 07:49:25 2345C++timAV<the字符串函数COM无法

  • Two Sum

    Two Sum Two Sum Given an array of integers, return indices of the two numbers such that they add up to a specific target.You may assume that each input would have exactly one solution, and you may not use the same element twice. Example: Given nums...

    2019-08-16 07:49:10 iOSPSmacAVHTTPS<theCOMHTTPexit

  • Add Two Numbers

    Add Two Numbers Add Two Numbers You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers and return it as a linked lis...

    2019-08-16 07:49:05 iOSPSmacHTTPS<theCOMHTTPgit执行