A Two Bases
After seeing the "ALL YOUR BASE ARE BELONG TO US" meme for the first time, numbers X and Y realised that they have different bases, which complicated their relations. >>继续阅读
A Two Bases
After seeing the "ALL YOUR BASE ARE BELONG TO US" meme for the first time, numbers X and Y realised that they have different bases, which complicated their relations. >>继续阅读
A sequence1
Problem Description
Given an array a with length n, could you tell me how many pairs (i,j) ( i < j ) for abs(ai−aj) mod b=c.
Input >>继续阅读
A 2Char
Andrew often reads articles in his favorite magazine 2Char. The main feature of these articles is that each of >>继续阅读
A Olesya and Rodion
Olesya loves numbers consisting of n digits, and Rodion only likes numbers that are divisible by t. Find some number that satisfies both of them.Your task is: given the n and t print an integer strictly larger than zero consisti >>继续阅读
A Asphalting Roads
City X consists of n vertical and n horizontal infinite roads, forming n × n intersections. Roads (both vertical and horizontal) are numbered from 1 to n, and the intersections >>继续阅读
A Card Game
Problem Description
Soda and Beta are good friends. They are going to play a card game today. Soda has n cards with number a1,a2,...,an >>继续阅读
A Vasya the Hipster
One day Vasya the Hipster decided to count how many socks he had. It turned out that he had a red socks and bblue socks. According to the latest fashion, hipsters should wear the socks of different colors: a red one on the left >>继续阅读
Scaena Felix
Problem Description
Given a parentheses sequence consist of '(' and ')', a modify can filp a parentheses, changing '(' to ')' or ')' to '('. >>继续阅读
A Kefa and First Steps
Kefa decided to make some money doing business on the Internet for exactly n days. He knows that on the i-th day (1 ≤ i ≤ n) he makes ai money. Kefa loves progress, that's why he wants to know the length of the maximum non-de >>继续阅读
This is the logo of PKUACM 2016. More specifically, the logo is generated as follows:
Put four points A0(0,0), B0(0,1), C0(1,1), D0(1,0) on a cartesian coordinate system.
Link A0B0, B0C0, C0D0, D0A0separately, forming square A0B0C0D0.
J Jesus Is Here
Problem Description
I've sent Fang Fang around 201314 text messages in almost 5 years. Why can't she make sense of what I mean?
But Jesus is here!" the priest intoned. Show me your messages."
Fine, the first message is s1=‘‘c" >>继续阅读
You are given two distinct points A and B in the two-dimensional plane. Your task is to find any point C with the following properties:
C is different from A and B. >>继续阅读