acm

Codeforces #1113C

Written by  on February 22, 2019

1113C C. Sasha and a Bit of Relax 题意 给一个数组,然后求满足 的[l, r]子序列有多少个,其中表示异或计算。 思路 关键点在于如果满足条件的[l,r]存在,那么

[Read more...]

POJ3020

Written by  on August 14, 2018

POJ3020 Antenna Placement Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 10821 Accepted: 5324 Description The Global Aerial Research Centre has been allotted the task of building the fifth generation of mobile phone nets in Sweden. The most striking reason why they got the job, is their discovery of a new, highly noise resistant, antenna. It is called 4DAir, and comes in four types. Each type can only transmit and receive signals in a direction aligned with a (slightly skewed) latitudinal and longitudinal grid, because of the interacting electromagnetic field of the earth. The four types correspond to antennas operating in the directions north, west, south, and east, respectively. Below is an example picture of places of interest, depicted by twelve small rings, and nine 4DAir antennas depicted by ellipses covering them.

[Read more...]

POJ3041

Written by  on August 14, 2018

POJ3041 Asteroids Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 26141 Accepted: 14134 Description Bessie wants to navigate her spaceship through a dangerous asteroid field in the shape of an N x N grid (1 <= N <= 500). The grid contains K asteroids (1 <= K <= 10,000), which are conveniently located at the lattice points of the grid.

[Read more...]

Codeforces #879C

Written by  on November 6, 2017

879C C. Short Program time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Petya learned a new programming language CALPAS. A program in this language always takes one non-negative integer and returns one non-negative integer as well.

[Read more...]

POJ1182

Written by  on December 13, 2016

POJ1182 食物链 Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 66244 Accepted: 19522 Description 动物王国中有三类动物A,B,C,这三类动物的食物链构成了有趣的环形。A吃B, B吃C,C吃A。

[Read more...]

Codeforces #733 D

Written by  on November 2, 2016

733D D. Kostya the Sculptor time limit per test 3 seconds memory limit per test 256 megabytes input standard input output standard output Kostya is a genial sculptor, he has an idea: to carve a marble sculpture in the shape of a sphere. Kostya has a friend Zahar who works at a career. Zahar knows about Kostya’s idea and wants to present him a rectangular parallelepiped of marble from which he can carve the sphere.

[Read more...]

Codeforces #719 C

Written by  on October 26, 2016

719C C. Efim and Strange Grade time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output

[Read more...]

Codeforces #721 C

Written by  on October 11, 2016

721C C. Journey time limit per test 3 seconds memory limit per test 256 megabytes input standard input output standard output Recently Irina arrived to one of the most famous cities of Berland — the Berlatov city. There are n showplaces in the city, numbered from1 to n, and some of them are connected by one-directional roads. The roads in Berlatov are designed in a way such that there are nocyclic routes between showplaces.

[Read more...]

POJ1006

Written by  on February 1, 2016

POJ1006 Biorhythms Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 124772 Accepted: 39392 Description Some people believe that there are three cycles in a person’s life that start the day he or she is born. These three cycles are the physical, emotional, and intellectual cycles, and they have periods of lengths 23, 28, and 33 days, respectively. There is one peak in each period of a cycle. At the peak of a cycle, a person performs at his or her best in the corresponding field (physical, emotional or mental). For example, if it is the mental curve, thought processes will be sharper and concentration will be easier.

[Read more...]

POJ1458

Written by  on February 1, 2016

POJ1458 Common Subsequence Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 44778 Accepted: 18346 Description A subsequence of a given sequence is the given sequence with some elements (possible none) left out. Given a sequence X = < x1, x2, …, xm > another sequence Z = < z1, z2, …, zk > is a subsequence of X if there exists a strictly increasing sequence < i1, i2, …, ik > of indices of X such that for all j = 1,2,…,k, xij = zj. For example, Z = < a, b, f, c > is a subsequence of X = < a, b, c, f, b, c > with index sequence < 1, 2, 4, 6 >. Given two sequences X and Y the problem is to find the length of the maximum-length common subsequence of X and Y.

[Read more...]