2878 - I2P(I)2023_Hu_mid1 Scoreboard

Time

2023/10/23 18:30:00 2023/10/23 21:30:00

Clarification

# Problem Asker Description Reply Replier Reply Time For all team

# Problem Pass Rate (passed user / total user)
14018 Another Hacker Domo
14049 Domo's Treasure
14066 Text maze v2.0

14018 - Another Hacker Domo   

Description

Domo is a brilliant dog hacker, he wants to find out the password of your computer.

 

This time, he successfully obtained the compressed file containing the password, all he needed to do was unzip it.

 

The correct format of a password zip must be [integer][alpha][integer][alpha][integer][alpha]......

where [integer] is an integer greater than 0, representing the number of repetitions for the following alphabet.

[alpha] is a letter from the set of [a-z], [A-Z], or ['0', '1', ..., '9']

[integer][alpha] is a basic zip pair unit.

 

Here are some examples:

Before Unzip After Unzip
3a3d4'1' aaaddd1111
2'5'3'7'2c 55777cc
5ad3c Can't Unzip (Wrong format)
5d3s3 Can't Unzip (Wrong format)
5d3s0g Can't Unzip (integer must > 0)

 

Given the zipped string, please help Domo find the correct unzip string (which is the password of the computer). If the string can't be unzipped, output "Domo cannot crack this computer"

 

Input

The input consists of multiple zipped strings (1 ≤ number of strings ≤ 100), separated by a newline character.

 

In each string (1 ≤ the length of string ≤ 1000), the [integer] is guaranteed to consist of a number N (0 ≤ N ≤ 100) without any leading zero. There are only uppercase and lowercase letters, digits, and single quotes in the string.

 

Notice that 0 can appear in the string, but the string can't be unzipped.

 

Output

Output the corresponding password for every string. It's guaranteed that the length of every unzipped string is less than 1000000.

 

Remember to print a newline character at the end of every password.

 

Sample Input  Download

Sample Output  Download

Tags




Discuss




14049 - Domo's Treasure   

Description

Domo is a brilliant dog. During Domo's exploration on the waterway, he discovered a treasure. Unfortunately, he doesn't know the password for the treasure chest yet. Please help him find the password so he can claim the treasure.

 

On the treasure chest, there is a sequence of numbers, and the password for the treasure chest is the count of subsequences that follow the rules below:

 

1. The length of the subsequence is 4.

2. The sum of the subsequence is S.

3. The subsequnce [Ai​, Aj​, Ak​, Al​] should satisfies that Ai​ ≤ Aj​ ≤ Ak​ ≤ Al

 

For example, if the sequence is [1, 1, 1, 3, 3, 5, 1], and S is 8

 

Then, the following four subsequences satisfy the rules above.

1. [1, 1, 1, 5], where the index is 0, 1, 2, 5

2. [1, 1, 3, 3], where the index is 0, 1, 3, 4

3. [1, 1, 3, 3], where the index is 0, 2, 3, 4

4. [1, 1, 3, 3], where the index is 1, 2, 3, 4

 

Hence, the password would be 4.

 

Input

The first line consists of two integers N (1 ≤ N ≤ 50) and S (1 ≤ S ≤ 100), describing the length of the sequence and S.

 

The next line consists of N integers, describing the given sequence. (0 ≤ Ai ≤ 50)

 

Output

Output the password of the chest. Remember to print a newline character at the end of the line.

 

Sample Input  Download

Sample Output  Download

Tags




Discuss




14066 - Text maze v2.0   

Description

This problem is modified from 13648 - Text maze.

There will be a 2D map composed of only 5 kinds of alphabets, which are a, b, c, d, and e.

 

First, given the position P (e.g., (2, 3)), you must find the smallest(Using ASCII code) char around it (should be at most eight choices).

Note that if there are duplicated chars, please choose the element with larger index:

 
Next, different from 13648 - Text maze, the instruction is decided by the summation (When calculating the summation, 'a' stands for 0, 'b' stands for 1, and so on.) of the previous character, the current character, and the chosen character (The one following the rule mentioned above.) .
 
If the summation exceeds 'e,' please return from 'a' to ensure that the result falls within the range of 'a' to 'e'. For example, if the summation is 6, you should return to 'b'.
 
 
Note that for the first step, the previous character will be itself.
 
 

Next,

if the summation is 'a', please move your current position to the left;

if the summation is 'b', please move your current position to the right; 

if the summation is 'c', please move your current position to the up; 

if the summation is 'd', please move your current position to the down;

if the summation is 'e', move your current position into the chosen char, and from now on, you have to find the biggest char, vise versa(If the current mode is to find the biggest char, start to find the smallest one).

 

There are two terminal situations:

(1) Your next step is outside the map (Next movement is illegal).

(2) You reach the given steps.

Once the whole process ends, please print the texts you've visited.

Input

There will be 4 parts for the input:

(1) The size of the map, n. (5 <= n <= 100)

(2) The maximum steps in the process, S. (1 <= S <= n**2 )

(3) The initial position(x, y).It is guaranteed that it is on the map.

(4) The text map with size n*n.

 

All of them are separated by a '\n'.

Output

The texts you've traversed.

Note that you dont' have to print "\n" at the end.

Sample Input  Download

Sample Output  Download

Tags




Discuss