题目描述:Given a positive integer, output its complement number. The complement strategy is to flip the bits of its binary representation.Note:The given integer ...
题目描述:Given a positive integer num, write a function which returns True if num is a perfect square else False.Note: Do not use any built-in library function su...
题目描述:Implement int sqrt(int x).Compute and return the square root of x.x is guaranteed to be a non-negative integer.Example 1:Input: 4Output: 2Example 2:...
题目描述: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...
Problem DescriptionThere are N buildings standing in a straight line in the City, numbered from 1 to N. The heights of all the buildings are distinct and be...
A. Lucky Yeartime limit per test:1 secondmemory limit per test:256 megabytesinput:standard inputoutput:standard outputApart from having lots of holidays th...
A. Bear and Big Brothertime limit per test:1 secondmemory limit per test:256 megabytesinput:standard inputoutput:standard outputBear Limak wants to become ...
B. Interesting drinktime limit per test:2 secondsmemory limit per test:256 megabytesinput:standard inputoutput:standard outputVasiliy likes to rest after a...