He has just recently reached the green rank in AtCoder.
This time, I have summarized what I have done personally and what I am paying attention to.
I think the following is necessary to reach the green rank.
--Solve the C problem within 15 minutes (** 3 complete 15 minutes ) --D Solve the problem within the time limit ( 4 Complete 100 minutes **)
Ultimately, I think it's possible to go to the green rank even if you can't solve the D problem (although it may take some time).
For reference, the table below summarizes the results of the contests I recently participated in virtually.
Contest name | result | Rating * |
---|---|---|
ABC127 | 3 complete | 921 |
ABC128 | 3 complete | 1148 |
ABC129 | 3 complete | 1005 |
ABC130 | 4 complete | 1309 |
ABC131 | 3 complete | 524 |
ABC132 | 4 complete | 1257 |
ABC133 | 4 complete | 1115 |
ABC134 | 4 complete | 1113 |
ABC135 | 3 complete | 1175 |
ABC136 | 4 complete | 1131 |
ABC137 | 4 complete | 1451 |
ABC138 | 4 complete | 1007 |
Looking at the table above, there are ** 3 times when the rate is 1148 or 1175.
ABC131 is an example where the D problem was easy, but it stopped at 3 completion. .. ..
Therefore, I personally think as follows.
Solve the C problem in 15 minutes each time, and solve the D problem once every three times! </ font>
If it takes more than 15 minutes to solve the C problem, I will definitely solve the D problem! I feel like.
The following is a summary of what you should be careful about when solving problems A to D.
Most of the problems A and B can be solved if you know the basic grammar.
I don't think there was any particular problem of worrying about the amount of calculation, so let's simply solve it using a for statement or an if statement.
Also, let's be able to perform basic list processing.
test.py
l =[]
l.append(1) #Add to list
a = l.pop() #Take out the end of the list
l = [i for i in range(N)] #Comprehension notation
max_l = max(l) #Get the maximum value in the list
min_l = min(l) #Get the minimum value of the list
And in the B problem, there is sometimes a problem such as "normal processing is performed when N> 1, but exception handling is performed when N = 0" (or rather, such a bug has occurred in the program I wrote. (Sometimes), so
test.py
import sys
if N == 0:
#Special treatment
sys.exit()
for i in range(N):
#Normal processing
I sometimes write something like this.
C has some difficult problems, and the amount of calculation must be taken into consideration.
In this problem, the input size is 2 * 10 ^ 9. This is a size that makes it TLE even in a single loop, so I have to think that a simple for statement cannot be used.
However, if you think about it positively, it is a hint because there is a way to surely reduce the amount of calculation.
In this problem, on the contrary, the input data is a character string of 10 characters or less. For problems with extremely small input data, ** full search ** is often used.
--If N <= 10, you can use bit full search and n! Street full search. --If 100 <N <200, you can use up to triple loop
I can expect something like that. It's just an expectation.
The C problem imports various Python libraries and modules.
Also, prepare frequently used functions in advance.
I will summarize the libraries, modules, and functions that I personally use for C problems.
--itertools (combination, permutation, full search of N! Streets) --math (least common multiple, greatest common divisor, etc.) --Enumeration of divisors (version obtained by O (√N)) --bit full search (valid only when N is small) --deque (list that can append and pop from the left and right edges) --heapq (priority queue) --collections (the one who counts the frequency of appearance) --bisect (binary search)
Please comment if there are others!
To put it the other way around, most problems can be solved without using difficult algorithms such as ** dynamic programming, Dijkstra's algorithm, DFS and BFS. ** **
Problem D is not stable because I can only solve it about 7 times if I have 10 contests, and sometimes I can solve it within 30 minutes and sometimes it is just 100 minutes.
Personally, I wondered if it would be stable if I could solve the problems listed in @ drken's this article without struggling. I will.
Therefore, the algorithm template written here is coded in advance, and it seems to be nice to add or modify the program depending on the problem.
If it's a green coder, you don't have to solve it. I have to study because I have to be able to solve the E problem to become light blue.
There are many personal opinions, but I hope it will be helpful.
Recommended Posts