Recently, I have often needed to include the universal header bits/stdc++.h when doing Kick Start. However, my beloved editor VS Code always fails to locate this header correctly and shows a red squiggly error. As a programmer, I absolutely cannot tolerate that, so I tried to solve the problem. I searched online for many solutions, but most of them did not directly solve my issue. So I am summarizing my own solution here for everyone to use.

Programming environment:
g++ 9.1.0, Mac 10.14.2, VS Code 1.45.1

The overall idea is:

Read more »

Rank Name Score Finish Time Q1 (3) Q2 (4) Q3 (5) Q4 (7)
484 / 13036 YoungForest 19 1:27:45 0:11:20 0:19:20 1 0:08:48 1:22:45

The last problem this week was a classic computational geometry problem and was not easy to write. But the acceptance rate was still quite high, probably because the test cases were relatively weak.

My ranking in the Cruel group dropped to 32, a 100% decline. The feeling I had before that I had become stronger was an illusion. It was because I got a good rank of 113 in Weekly Contest 186 three weeks ago, so according to the group’s ranking algorithm, my ranking stayed relatively high for the next three weeks. After that best result aged out, my ranking returned to its original level, around 30. It was not that I had become stronger; I was just lucky. Also, I happened to use Python in contest 186, and Python really does have an advantage in speed contests.

Read more »

Rank Name Score Finish Time Q1 (3) Q2 (4) Q3 (5) Q4 (7)
115 / 7795 YoungForest 19 0:33:49 0:03:55 0:08:25 0:11:57 0:28:49 1

The week before last was the May Day holiday, so I skipped one biweekly contest. I will still try to participate as much as possible afterward. Recently, contests have been feeling smoother and smoother, whether in terms of each contest ranking, rating, or ranking in the Cruel group. All of them have improved compared with before. In particular, I want to thank the Cruel group for its daily problem and occasional lectures, which gave me more confidence in solving DP and many Hard problems. Here I recommend the Cruel LeetCode group again.

1446. Consecutive Characters

Read more »

Rank Name Score Finish Time Q1 (3) Q2 (4) Q3 (5) Q4 (7)
445 / 12715 YoungForest 19 1:14:29 0:07:04 0:17:33 0:56:49 1:14:29

My rating has stayed above 2200 for two weeks. Although this week’s rating has not been updated yet, based on my rank it should continue to rise. I will try to reach the 2300+ line as soon as possible. Recently I have hit a bottleneck in problem solving. I still cannot solve many hard problems, and I have not summarized my own templates and categories for solving problems. I found that many strong people are strong because after seeing the problem statement, they can quickly identify which concrete category the problem belongs to, quickly connect it with problems they have solved before, and only then AC both fast and bug free.

1441. Build an Array With Stack Operations

Read more »

Rank Name Score Finish Time Q1 (3) Q2 (4) Q3 (5) Q4 (7)
301 / 12353 YoungForest 19 1:03:24 0:06:34 0:03:07 0:17:30 1:03:24

1436. Destination City

Traverse each edge and count the out-degree of each point.

Read more »

Nearly two months have passed since I posted my first summer internship interview experience on Nowcoder. In between, I successively participated in recruiting processes at eight companies. All roles were backend/server development roles, based in Beijing.

Failed

ByteDance

Read more »

Rank Name Score Finish Time Q1 (4) Q2 (4) Q3 (6) Q4 (7)
113 / 11684 YoungForest 18 0:34:17 0:04:32 0:10:54 0:18:49 0:34:17

A speed contest. After switching to Python, speed contests became much easier. Life is short; I use Python. But while using Python for problem solving, I also discovered some issues.

  • I am not familiar enough with the API. For example, sorted returns a sorted list, rather than doing an in-place sort.
  • The data structures are incomplete. For example, there is no TreeMap, and priority_queue can only be replaced with heap. For a max heap, all numbers need to be multiplied by -1, which is an ugly implementation.
  • runtime error. With some typos, there can be wrong submissions. At this point, your test cases become very important: whether they cover all cases and boundary conditions.
Read more »

Rank Name Score Finish Time Q1 (4) Q2 (4) Q3 (6) Q4 (7)
703 / 9206 YoungForest 12 0:36:35 0:10:24 0:22:03 0:31:35 1 null

1417. Reformat The String

Count the number of digits and letters separately. If the difference in counts is no greater than 1, the string can be reformatted.
Choose the category with more characters first.

Read more »

ID score rank Bike Tour Bus Routes Robot Path Coding Wandering Robot Time
YoungForest 74 524 5 + 7 10 + 13 11 + 16 14 + 0 1:35:18

Last year I participated in six Kick Start rounds in total and successfully got Google’s internship offer this year. Unfortunately, because of the pandemic, all Google China summer internship programs were canceled. This year, for full-time recruiting, I still need to continue participating in Kick Start. Although today’s Round B was at 7 a.m., many classmates still joined. Unfortunately, my time complexity for the last problem was too high, and the large test set TLE’d.

Bike Tour

Read more »

Rank Name Score Finish Time Q1 (3) Q2 (4) Q3 (5) Q4 (6)
700 / 7729 YoungForest 18 1:17:49 0:04:50 0:10:38 0:17:45 1:02:49 3

Recently I participated in two Codeforces contests, and my CF rating is hovering around 1400+. Codeforces problems are much harder than LeetCode’s. I did not manage to keep going. This is also related to CF not having a very good discuss section; after each contest ends, I can only read the official editorial.

1413. Minimum Value to Get Positive Step by Step Sum

Read more »
0%