3253 - EE2310 Week7 Practice Scoreboard

Time

2025/10/13 00:00:00 2025/12/31 23:59:00

Clarification

# Problem Asker Description Reply Replier Reply Time For all team

# Problem Pass Rate (passed user / total user)
14777 Graphic Rotation
14778 Plural Forms
14779 Word Similarity Judgment

14777 - Graphic Rotation   

Description

Write a program to rotate a pattern. The pattern consists of n rows and m columns of numbers or letters.
The program must rotate the pattern three times and print the result after each rotation.

The input contains n lines, each with m consecutive numbers or letters.
The program must process all characters until EOF.

The output should contain four versions of the pattern:

  1. the original pattern, and

  2. three more patterns obtained by rotating the original one clockwise each time.

Input

N lines, each with m consecutive numbers or letters.

Ex. 01
ab
27

Output

Four versions of the pattern:

  1. the original pattern, and

  2. three more patterns obtained by rotating the original one clockwise each time.

Ex. 01
ab
27
2a0
7b1
72
ba
10
1b7
0a2

Sample Input  Download

Sample Output  Download




Discuss




14778 - Plural Forms   

Description

Write a program that converts English nouns to their plural forms according to the rules below.

Note: these rules apply only for this problem and are not guaranteed to be 100% accurate for English in general.

Rules:

  1. If a noun ends with ch, sh, s, z, or x, add es.
    Example: the plural of box is boxes.

  2. If a noun ends with y, examine the letter before the y.

    • If the preceding letter is a vowel (a, e, i, o, u), simply add s.
      Example: the plural of toy is toys.

    • If the preceding letter is not a vowel, replace y with ies.
      Example: the plural of story is stories.

  3. For all other nouns, just add s.

Constraints:

  • 0 < n <= 80

Input

Each line contains a lowercase English word of length at most n.

The program must process all input until EOF.

Ex.box
toy
story
car

Output

For each input word, output its plural form according to the rules above.

Ex.boxes
toys
stories
cars

Sample Input  Download

Sample Output  Download




Discuss




14779 - Word Similarity Judgment   

Description

Write a program to determine whether two words are similar.
Two words are considered similar if either of the following conditions is true:

  1. The two words have the same length, and by swapping two consecutive characters in one of the words, we can obtain the other word.
    For example, best and bets are similar because if we swap the characters s and t in “best,” we get “bets.”

  2. The two words differ in length by one, and by deleting one character from the longer word, we can obtain the shorter one.
    For example, best and bet are similar because if we delete the s from “best,” we get “bet.”

Each line of input contains two words to be compared.
The program must process all input until EOF.
The maximum word length is n, where 0 < n ≤ 80.

If a pair of words is similar, output yes; otherwise, output no.

Input

Two words.

The program must process all input until EOF.

(The maximum word length is n, where 0 < n ≤ 80.)

Output

If a pair of words is similar, output yes; otherwise, output no.

Sample Input  Download

Sample Output  Download




Discuss