Skip to content

Commit 14dbd0f

Browse files
author
不断同学
committed
Replace Bertram
use yinan
1 parent d02afe2 commit 14dbd0f

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

Problems/FlingLikFullOfVim.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
# FlingLikFullOfVim
22

3-
Difficulty: ******
3+
Difficulty: \*\*\*\*\*\*
44

55
Time limit: 2.00s
66

77
Memory limit: 512MB
88

99
## Background
1010

11-
Ernest Vincent Wright was an American author, known for writing a novel (Gadsby) without using the letter **“e”**. Bertram Liu is a big fan of Ernest and tries to imitate him in writing a novel, but is looking for a real challenge. He uses only the first ten characters of the alphabet (namely abcdefghij).
11+
Ernest Vincent Wright was an American author, known for writing a novel (Gadsby) without using the letter **“e”**. Yinan Sun is a big fan of Ernest and tries to imitate him in writing a novel, but is looking for a real challenge. He uses only the first ten characters of the alphabet (namely abcdefghij).
1212

13-
Ironically, the “e” key on his computer breaks halfway through the novel, and for consistency, he decides to delete all the “e”s he has already written. His friend, a programmer, recommended him to use the text editor Vim to perform this task. Unfortunately, Bertram is not very familiar with Vim, and knows only three different commands: **“x”**, **“h”** and **“f”**.
13+
Ironically, the “e” key on his computer breaks halfway through the novel, and for consistency, he decides to delete all the “e”s he has already written. His friend, a programmer, recommended him to use the text editor Vim to perform this task. Unfortunately, Yinan is not very familiar with Vim, and knows only three different commands: **“x”**, **“h”** and **“f”**.
1414

15-
- **“x”** deletes the character at the cursor. The cursor position (counted from the left) does not change. Bertram shall not use this command if the cursor is at the last character of the document.
15+
- **“x”** deletes the character at the cursor. The cursor position (counted from the left) does not change. Yinan shall not use this command if the cursor is at the last character of the document.
1616
- **“h”** moves the cursor one step backward (to the left). Nothing happens if the cursor is at the beginning of the document.
1717
- **“f”** waits for the user to input another character \( C \), and then moves the cursor forward to the next occurrence of \( C \) (even if the character at the cursor happens to be \( C \)). Nothing happens if \( C \) does not occur anywhere to the right of the cursor position.
1818

@@ -32,7 +32,7 @@ where the cursor is denoted by a frame like \(\boxed{i}\), then
3232
3333
## Task
3434

35-
Write a program that calculates the least number of key presses that Bertram needs to use to delete all the **“e”s** in the document, but no other letters. Initially, the cursor is at the first character of the document.
35+
Write a program that calculates the least number of key presses that Yinan needs to use to delete all the **“e”s** in the document, but no other letters. Initially, the cursor is at the first character of the document.
3636

3737
## Input format
3838

@@ -41,7 +41,7 @@ each one of the ten lowercase letters from **“a”** to **“j”**. The first
4141

4242
## Output format
4343

44-
The only line of output should contain exactly one integer \( T \): the least number of key presses Bertram needs to delete all the **“e”s**.
44+
The only line of output should contain exactly one integer \( T \): the least number of key presses Yinan needs to delete all the **“e”s**.
4545

4646
## Example
4747

@@ -82,4 +82,4 @@ In actual cases where \( T \ge 14 \), this is more likely to be efficient (not c
8282
:%s/\%d101//g<Enter>
8383
```
8484

85-
Ah, but alas, poor Bertram was unaware of this clever workaround, that's a pity. But let’s remain optimistic — perhaps soon he’ll stumble upon these knowledge and become a true Vim master!
85+
Ah, but alas, poor Yinan was unaware of this clever workaround, that's a pity. But let’s remain optimistic — perhaps soon he’ll stumble upon these knowledge and become a true Vim master!

0 commit comments

Comments
 (0)