It is an article according to the title. I started AtCoder in September and it turned light blue at AGC41 the other day. I thought I would summarize what I have done so far in this area, so I will write it as an article. I don't know if it will be helpful to everyone.
――I have taken the junior high school exam and graduated from the former imperial university graduate school (chemistry major). Therefore, I have the mathematical background to enroll in them. I had a lot of fun at college, so I don't remember college mathematics. ――Business is IT-related, but I rarely program because it is closer to infrastructure. --Java was touched about a year ago for about two months. I've touched C ++ a little long ago. So I'm not a complete layman about programming. --Examples of what you knew before you started AtCoder - if, for, while --Array --Standard input / output - VSCode --Examples of things you didn't know until you started AtCoder --python grammar --Concept of computational complexity --Recursive function --DFS / BFS
You can solve the ABC B problem without much hesitation, but start from a state where you have almost no knowledge of competitive programming and algorithms. AtCoder started out as a hobby.
** Solve problems with just the right level of difficulty with Atcoder Problems. **only this. ↓ This is the current ABC filling status. Well, I'm asking 330 questions in 4 months, so I think it's a person who packed it in a short period of time, but if you think of it as light blue after doing 330 questions, isn't it appropriate? Impression that. Recently, I've been filling up the contest a little, so there are fewer problems that I actually learned.
――If there is something you don't understand or a method you don't know, google it ad hoc. Since the explanation of AtCoder contains algorithms and methods that are keywords, try implementing it yourself while searching for implementation examples with "(keyword) python". If you want to use what you made, make it into a library. The current situation is like this.
By the way, ** I haven't used mathpy or scipy yet. ** ** You can do it without using it at all. I plan to use it in the future.
――Filling in too low difficulty may be good for maintaining motivation, but I think it is useless (not meaningless) for improving. A person who can solve problem A in 4 minutes can only earn 2 minutes even if he doubles the speed, but if problem D takes 40 minutes, he can earn 4 minutes just by speeding it up by 10%, so it is a difficult problem. I think that it is easier to improve if you work on. Also, from experience, even if you solve 10 questions of 300 points, you will not be able to solve 400 points. If you can solve 400 points, you have to challenge 10 questions to 400 points. ―― ** It is a truth that has been verified in all fields that it is best for growth to continue to take on challenges that are about 1.1 times your own ability. ** At Coder, the conclusion so far is that it is best to tackle the "problem of whether you can solve it in about an hour".
――Think about the problem until you understand it completely. Even if you look at the commentary and think, "Oh, I see," don't stop there. I will do it until I implement it properly with my own hands. The same was true for studying for entrance exams, but ** The most dangerous thing is that you can solve it by accumulating as many questions as you can and moving your hands by stopping thinking. ** I will do it with the intention of making each question my own blood. However, there are some things that I still think "I'm still early" when I look at the commentary, so I don't overdo it. --See other people's answers submitted in python. It's often too advanced to be helpful, but I often come across things I didn't know. ――I bought an ant book and read about half of it. I try to read it when I feel a sense of stagnation. It is important to read a comprehensively written book. Of course, you can't write code just by reading.
--Algorithmic power does not depend on language --Implementation power depends on language experience, not language selection ――Every language has advantages and disadvantages --Learning costs are overwhelmingly lower for the second and subsequent languages than for the first language
That's a major premise, and on top of that, I'll list the merits that I actually felt using python.
It's easy to understand what you're doing at a glance ... I feel. This is more of an advantage when you look at someone else's code than it is for you to use it. To be honest, I feel that it doesn't matter whether I write it a little confusingly or with a lot of parentheses. Modern major languages may not be as good or bad as they are (because they are otherwise eliminated). On the other hand, when reading someone else's code, I often find python to be advantageous because it is short and neat. Well this is also subjective.
There are many people who wondered, "Is this there?" Binary search, priority queue, permutation, etc. And if you google, it basically comes out. There are various shortest path methods (although it is better to have one that you have implemented yourself so that you can make various minor modifications).
Of course, you can't use something you don't know. You don't have a chance to know until you run into the problem of using that method. Well, all you have to do is study.
I think that it is common to all languages to some extent, but the speed changes completely depending on the method used even with the same implementation content. Especially around the text operation, the difference is bigger. However, I think that the big difference is the flip side of the abundance of methods. It can be said that it is a big merit that you do not have to implement detailed methods by yourself.
Basically, you can use pypy, but python is faster only for recursive functions. If you are in a hurry during the contest, you may forget your choice and TLE (one loss).
However, I have never had a python competition professional life so far that "TLE remains, but there is no room for scraping anymore". [Here](https://maspypy.com/atcoder-%E6%A9%992400%E3%81%AB%E3%81%AA%E3%82%8A%E3%81%BE%E3%81%97 It is also written in% E3% 81% 9F), but I think that it will not be a problem unless it is at a level that turns yellow or orange. I think python should be stopped if you are confident that you can turn yellow in such a short time that you do not have time to change the language, but how many people are there in the world ... Also, I personally have a little doubt about the opinion that "improvement by a constant factor is not essential", and as long as I compete with the code I actually wrote, I devised a way of writing so that it fits within the time limit by suppressing the characteristics of the language. Isn't it natural to do it? I think. Even if the logic is correct, I think that it should be incorrect if the execution speed is slow.
Since I have solved a lot of problems by studying for entrance exams for a long time, the reward system for solving the problems has been completed. Waiting for the judge, the brain juice when the AC display appears is still a great motivation to continue AtCoder.
Especially within the limited time of the contest, it is easy to copy and paste almost the same process over and over, and to increase the number of cases more than necessary. I don't think that the skill of writing clean code is very good unless you are aware of it.
Of course, it may be useful depending on the type of business, but at my company, the connection with the DB / front and the framework are more important, so I don't feel that it is very useful in practice. Well, I think that's the case. I feel like I'm just doing it as a hobby.
There are so many things I haven't studied yet, so I want to continue to increase what I can do and go as far as I can. Isn't it something that goes up to blue? I feel that.
that's all. If you have any idea, I will add it.
Recommended Posts