最新 最热

LeetCode 0149 - Max Points on a Line

Given n points on a 2D plane, find the maximum number of points that lie on the same straight line.

2021-08-11
0

LeetCode 0135 - Candy

There are N children standing in a line. Each child is assigned a rating value.

2021-08-11
1

LeetCode 0195 - Tenth Line

Given a text file file.txt, print just the 10th line of the file.

2021-08-11
1

HDU 1512 - Monkey King

Once in a forest, there lived N aggressive monkeys. At the beginning, they each does things in its own way and none of them knows each other. But monkeys can’t ...

2021-08-11
1

ACMSGURU 231 - Prime Sum

Find all pairs of prime numbers (A, B) such that A<=B and their sum is also a prime number and does not exceed N.

2021-08-11
1

ACMSGURU 123 - The sum

The Fibonacci sequence of numbers is known: F1 = 1; F2 = 1; Fn+1 = Fn + Fn-1, for n>1. You have to find S - the sum of the first K Fibonacci numbers.

2021-08-11
1

ACMSGURU 127 - Telephone directory

CIA has decided to create a special telephone directory for its agents. The first 2 pages of the directory contain the name of the directory and instructions fo...

2021-08-11
1

ACMSGURU 275 - To xor or not to xor

The sequence of non-negative integers A1, A2, …, AN is given. You are to find some subsequence Ai1, Ai2, …, Aik (1 <= i1 < i2 < … < ik <= N) such, that Ai1 XOR ...

2021-08-11
1

ACMSGURU 118 - Digital Root

Let f(n) be a sum of digits for positive integer n. If f(n) is one-digit number then it is a digital root for n and otherwise digital root of n is equal to digi...

2021-08-11
1

LeetCode 0011 - Container With Most Water

Given n non-negative integers a1, a2, …, an, where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two endpoints of line...

2021-08-11
1