| # | Problem | Pass Rate (passed user / total user) |
|---|---|---|
| 11102 | Problem A. Cut The Rope |
|
| 11103 | Problem B. Math Question |
|
| 11104 | Problem C. Q.E.D. |
|
| 11105 | Problem D. Knight Number |
|
| 11106 | Problem E. Perfect Accessories |
|
| 11107 | Problem F. A.T. Field |
|
| 11108 | Problem G. Stick Triangle |
|
| 11109 | Problem H. Locked Basement |
|
Description
Cut the Rope is a series of physics-based puzzle video games developed by the Russian entertainment company ZeptoLab for several platforms and devices. It consists of the original Cut the Rope (2010) published by Chillingo, Cut the Rope: Experiments (2011), Cut the Rope: Time Travel (2013), Cut the Rope 2 (2013 iOS; 2014 Android), My Om Nom (2014 iOS; 2015 Android), and Cut the Rope: Magic (2015).
The objective of the Cut the Rope games is to feed candy to a little green creature named Om Nom while collecting stars. As of May 2015, Cut the Rope games have been downloaded more than 600 million times.
Now you have a very long rope to cut. The length of rope is L. And here are some rules to follow:
• After the cutting, the number of the ropes is maximum.
• After the cutting, the length of every piece of the rope must be a, b, or c.
Input
The first line contains an integer T (T ≤ 100), which indicates the number of test cases. For each case, one line contains 4 integers L, a, b, c (1 ≤ L, a, b, c ≤ 4000).
Output
For each case, output one line containing the maximum of the number of the pieces.
Sample Input Download
Sample Output Download
Tags
Discuss
Description
The Legend of Condor Heroes is a wuxia novel by Jin Yong (Louis Cha). It is the first part of the Condor Trilogy, and is followed by The Return of the Condor Heroes and The Heaven Sword and Dragon Saber.
In the story, there is a very smart character called Huang Rong. Huang Rong was born to Huang Yaoshi and Feng Heng. Her mother died shortly after she was born and her father raised her all by himself on Peach Blossom Island. She was an intelligent child and quick learner, so her father imparted her with all his skills and knowledge. She fled from home after an argument with her father and disguised herself as a beggar by donning filthy rags.
In the middle of the story, she had a math battle against Yin Gu. Finally, she solved the question faster to win the game. Here’s the question: Compute C(n,m) mod 1000000007(109 + 7). Could you solve this quickly?
Input
The first line contains an integer T (T ≤ 10), which indicates the number of test cases. For each case, one line contains two integers n,m (1 ≤ n ≤ 107,1 ≤ m ≤ n).
Output
For each case, output the answer. Follow the format of sample output.
Sample Input Download
Sample Output Download
Tags
Discuss
Description
Q.E.D. is a detective manga, created and produced by Motohiro Katou. Sou Touma is a university graduate who encounters a variety of investigative cases after returning to Japan from the US. He works with his friend, Kana Mizuhara, combining his deductive skills with Mizuhara’s social gifts.
Sou Touma is the main character of the series. Though he is a genius detective, he is not particularly interested in going out and finding wrongs to right. Rather, it is his erstwhile partner Kana who drags him into getting involved. An introvert, he is well-known for his intelligence, although he is not particularly popular.
The most interesting part of the story is that you read the story in Touma’s perspective. You can enjoy deducing with Touma without the spoiler. Touma majors in math so that he will use math induction to make the deduction. It’s a good manga for STEM students.
One day, Touma receives an anonymous letter with the following question: Given two positive integers a and b.
Count the number of pairs (i,j) such that i & j = 0. (i bitwise-and j = 0), ∀0 ≤ i ≤ a,∀0 ≤ j ≤ b. Could you solve it for Touma?
Input
The first line contains an integer T (T ≤ 10000), which indicates the number of test cases. For each case, one line contains two space-separated integers a, b (1 ≤ a, b ≤ 10^9).
Output
For each case, output an integer denoting the number of pairs. Follow the format of sample output.
Sample Input Download
Sample Output Download
Tags
Discuss
Description
Arthur was the first born son of King Uther Pendragon and heir to the throne. However these were very troubled times and Merlin, a wise magician, advised that the baby Arthur should be raised in a secret place and that none should know his true identity.
As Merlin feared, when King Uther died there was great conflict over who should be the next king. Merlin used his magic to set a sword in a stone. Written on the sword, in letters of gold, were these words: ”Whoso pulleth out this sword of this stone is the rightwise born king of all England.” Of course all the contenders for the throne took their turn at trying to draw the sword, but none could succeed. Arthur, quite by chance, withdrew the sword for another to use in a tournament. Following this he became King.
As few knows, how he found his knights is a mystery. After reading Merlin’s scroll, the secret is to find the knight with the implicit knight number tattoo.
A knight number is a number whose digits are composed of 4 or 7. 47774 and 7 are knight numbers, but 28, 700, and 728 are not knight numbers. An implicit knight number is divisible by a knight number. 28, 728, and 700 are implicit knight numbers. Check whether the number is an implicit knight number or not.
Input
The first line contains an integer T (T ≤ 100), which indicates the number of test cases. For each case, the first line is a non-negative integer N (N ≤ 1015).
Output
For each case, output one line containing a character ”T”(True) / ”F”(False) denoting whether the number is an implicit knight number.
Sample Input Download
Sample Output Download
Tags
Discuss
Description
Pokmon Go is a free-to-play, location-based augmented reality game developed by Niantic for iOS, Android, and Apple Watch devices. It was initially released in selected countries in July 2016. In the game, players use a mobile device’s GPS capability to locate, capture, battle, and train virtual creatures, called Pokmon, who appear on the screen as if they were in the same real-world location as the player. The game supports in-app purchases for additional in-game items.
Because you’re too late to the lab in the first day. You have only two remaining pokedexs with the accessory to choose. The figures are following:

Please drew them again.
Input
Please refer the sample files.
Output
Output the ASCII art as shown in the problem description. There are multiple lines, and the number of characters in the longest line is 95.
Sample Input Download
Sample Output Download
Tags
Discuss
Description
The year is 2015, 15 years after the first disastrous contact with the mysterious beings known as Angels resulted in the global cataclysm referred to as the Second Impact, which wiped out half of the human race. To defend humanity against future Angel attacks, the United Nations established the NERV organization in Tokyo-3 to develop giant bio-mechanical mecha known as Evangelions. Now, the Angels have finally returned, and the untested Evangelions can only be piloted by specially selected 14-year-olds. Shinji Ikari, estranged son of the director of NERV, Commander Gendo Ikari, arrives in Tokyo-3 and is dragooned into piloting Evangelion Unit-01 to fight the Angel, Sachiel, which is attacking the city.
As the operator of Evangelion (EVA) Unit-01, you always need to generate Absolute Terror Field (A.T. Field) to protect yourself from the enemy’s attack. The appearance of A.T. Field is a red triangle in 3D space, and it can rebound anything touching the triangle.
In the training, the mentor will tell you how to adjust the A.T. Field. Please figure out where is the final position of the A.T. field.
Input
The first line contains an integer T (T ≤ 1000), which indicates the number of test cases.
For each case, the first three lines denote the triangle, and every line contains 3 floating numbers indicating the position of one of the triangle’s points. (xi, yi, zi) The fourth line contains 3 floating numbers denoting the angles of the rotation by the ordering of x-axis, y-axis, and z-axis. (θx, θy, θz, θ ∈ [−π, π])
There is one blank line before every testcase.
Output
For each case, output three lines and every line contains 3 floating numbers denoting the position after the rotation. (xi′, yi′, zi′)
Sample Input Download
Sample Output Download
Tags
Discuss
Description
Re:Zero -Starting Life in Another World is a Japanese light novel series written by Tappei Nagatsuki and illustrated by Shinichirou Otsuka. The story centers on Subaru Natsuki, a hikikomori who suddenly finds himself transported to another world on his way home from the convenience store.
Subaru Natsuki is suddenly summoned to another world. With no sign of who summoned him, he soon befriends a silver-haired half-elf girl. When he and the girl are mysteriously killed, Subaru awakens and discovers that he has acquired the ability ”Return by Death”, enabling him to reverse time by dying.
One day, Subaru wants to set up the barrier around the village. Every barrier is a triangle composed of the sticks. Then he collected a lot of sticks and thought about how to count the summation of all possible triangles’ perimeters.
Input
The first line contains an integer T (T ≤ 10), which indicates the number of test cases.
For each case, the first line contains a positive integer N (N ≤ 1000) denoting the number of the sticks.
The second line contains N positive integers denoting the length of the ith stick. (1 ≤ Li ≤ 10^6)
Output
For each case, output one line containing one integer denoting the summation of the legal triangles formed by the sticks.
Sample Input Download
Sample Output Download
Tags
Discuss
Description
Attack on Titan is a Japanese manga series written and illustrated by Hajime Isayama.
The story of Attack on Titan revolves around the adventures of Eren Yeager, his foster sister, Mikasa Ackerman, and their childhood friend Armin Arlert. After the wall which protects their hometown of Shinganshina is breached by the Colossal Titan leading the other Titans to enter, Eren watches in horror as one of them eats his mother. Vowing to kill all the Titans, Eren enlists in the military, along with his friends.
In the latest episode, they finally arrived the locked basement in Eren’s home. And found the question his father left on the table:
For an integer sequence a1,a2,...,an, we define its Titan scheme as the sequence s1,s2,...,sn−1 of symbols <, > or =. The symbol si represents the relation between ai and ai+1. For example, the Titan scheme of the sequence 2,4,3,3,5,3 is <,>,=,<,>.
We say that an integer sequence b1, b2, . . . , bn+1 with Titan scheme s1, s2, . . . , sn, realizes another Titan scheme s′1,s′2,...,s′k if for every i = 1,2,...,n it holds that si = s′((i−1) mod k)+1. In other words, the sequence s1, s2, . . . , sn can be obtained by repeating the sequence s′1, s′2, . . . , s′k and removing appropriate suffix from that repetition. For example, the sequence 2, 4, 3, 3, 5, 3 realizes each and every one of the following schemes:
• <,>,=
• <,>,=,<,>
• <,>,=,<,>,<,<,=
• <,>,=,<,>,=,>,>
as well as many others.
An integer sequence a1,a2,...,an and a Titan scheme s1,s2,...,sk are given. Your task is to find the
longest subsequence ai1,ai2,...,aim(1 ≤ i1 < i2 < ... < im ≤ n) of the former that realizes the latter. The question is so hard. Could you help Eren to find the hope?
Input
The first line contains an integer T (T ≤ 40), which indicates the number of test cases.
For each case, the first line contains two integers, k (1 ≤ n, k ≤ 500000), separated by a single space,
denoting the lengths of the sequences (ai) and Titan scheme (sj) respectively.
The second input line gives the sequence (ai), i.e, it holds n integers ai separated by single spaces
(1 ≤ ai ≤ 1000000).
Finally, the third lines gives the Titan scheme (sj), i.e., it holds k symbols sj of the form <, > or =
separated by single spaces.
Output
For each case, output one line containing a single integer m, the maximum length of a subsequence of a1,a2,...,an that realizes the scheme s1,s2,...,sk.