1363 - I2P(I)2017_Chen_Lab5 Scoreboard

Time

2017/12/18 15:30:00 2017/12/18 17:45:00

Clarification

# Problem Asker Description Reply Replier Reply Time For all team

# Problem Pass Rate (passed user / total user)
11740 Sentence reversal v2
11741 Typo v2
11742 An eye for an eye

11740 - Sentence reversal v2   

Description

Difficulty: ★★★☆☆

Given several sentences, please modify the sentences so that the order of the words is reversed.

Input

The first line is the number of lines L.

The following is L lines, each line contains a sentence with several words.

Each word will be separated by one or several whitespace.

Also, whitespaces may appear in the front or in the back of the sentence.

It is guaranteed that:

  • 1  ≤ L  ≤ 10.
  • Each line contains at most 100 characters.
  • Contains only lowercase letter in each word.

Output

For each sentence, please output the two line.

First one is original sentence and second is modified sentence with the reverse sequence of words.

Attention: 

(1) After modification, each word is separated by only one whitespace.

(2) If there is no word in the sentence, you still need to output '\n'.

Sample Input  Download

Sample Output  Download

Tags




Discuss




11741 - Typo v2   

Description

Difficulty: ★★☆☆☆

You need to design a new typo detector for debugging, there are only two types of typos to detect:


(1) Accidentally capitalize exactly one lowercase character.

(2) Accidentally switches two different characters (Not only detect adjacent characters)


Arc will input two strings s (the correct string) and t (the wrong string). Your design must be able to determine whether t meets exactly one of the four types of typo as above.

Input

The first line contains an integer T, representing the number of inputs Arc gives to you.

The next T line contains two strings siti, representing the correct string and the wrong string.

It is guaranteed that:

  • 1 ≤ T ≤ 10
  • 1 ≤ | si |, | ti | ≤ 100

Output

For each input, if t meets exactly one of the two types of typo, please output "Yes", 

otherwise, please output "No".

Sample Input  Download

Sample Output  Download

Tags




Discuss




11742 - An eye for an eye   

Description

Difficulty: ★☆☆☆☆

A upper case letter can be eliminated with a correspoding lower case letter.

For instance, a 'Q' can be eliminated with a 'q'.

 

Your output should be the number(length) of remaining letters.

If the input string is 'bbAABBBaaaC', the remaining letter would be 'BaC'.

Hence the output is 3.

Input

First N(N<=10)represents the number of the testcase.
Follow by N lines strings.
The length should not exceed 100.
Strings contain letters only, which means digits excluded.

Output

The numbers(length) of the remaining string.

Sample Input  Download

Sample Output  Download

Tags




Discuss