最新 最热

习题28:作出决定

这里的重点是你可以在"if语句"内部再放一个“if语句”,这是一个很强大的功能,可以用来创建嵌套(nested)的决定,其中的一个分支将引向另一个分支的子分支...

2018-08-02
1

leetcode-724-Find Pivot Index

题目描述:Given an array of integers nums, write a method that returns the "pivot" index of this array.We define the pivot index as the index where the sum of the ...

2018-07-05
1

基数排序

假设对0~10^6-1的1000个整数进行排序,使用基数排序r=10^6的排序方法相当于直接对数使用箱子排序。对箱子的初始化需要10^6个执行步,节点分配需要1000个执行步,收集箱子节点需要10^6个执行步,总的执行步数为2001000。 使用...

2018-05-28
1

leetcode-747-Largest Number At Least Twice of Others(求vector的最大值和次大值)

题目描述:In a given integer array nums, there is always exactly one largest element.Find whether the largest element in the array is at least twice as much as eve...

2018-05-21
1

leetcode-762-Prime Number of Set Bits in Binary Representation

题目描述:Given two integers L and R, find the count of numbers in the range [L, R] (inclusive) having a prime number of set bits in their binary representation.(R...

2018-05-21
1

以太通道的配置原则

以太通道-Etherchannel-配置以太通道实现端口捆绑增加带宽和可靠性。以太通道的作用:-多条线路负载均衡,提高带宽;-容错,当一条线路失效时,其余线路通信,不会丢包配置以太通道的原则:-配置捆绑了的端口必须属于同一个vlan,如...

2018-04-16
1

Codeforces 768B Code For 1

B. Code For 1time limit per test:2 secondsmemory limit per test:256 megabytesinput:standard inputoutput:standard outputJon fought bravely to rescue the wil...

2018-04-08
1

No.013 Roman to Integer

13. Roman to IntegerTotal Accepted: 95998Total Submissions: 234087Difficulty: EasyGiven a roman numeral, convert it to an integer. Input is guaranteed to be...

2018-02-27
1

Leetcode 13 Roman to Integer

Given a roman numeral, convert it to an integer. Input is guaranteed to be within the range from 1 to 3999. 和12正好相反,理解转换规则,打一个表就行了class Solution {public: ...

2018-01-12
1

Leetcode 12 Integer to Roman

Given an integer, convert it to a roman numeral. Input is guaranteed to be within the range from 1 to 3999.模拟题,主要是搞清楚罗马数字的写法和规则,然后打个表就可以了。class Solution {p......

2018-01-12
1