Cuber-26's blog

By Cuber-26, history, 12 months ago, In English

Hello everyone, I'm Cuber-26.

Two years ago I don't even know how to write a program in programming language like C++. I started to learn programming and some very basic algorithms when I was a Freshman. Now it has been a year since I first come to Codeforces, currently my contest rating is $$$1815$$$.

Since I'm actually a student learning Mathematics, the part I do the best is Number Theory. I'm also good at solving some constructive problems and math problems. Problems like interactive or bitmask are OK for me too.

However some parts are my shortcomings:

  1. Data Structures: Now I only learned BIT, Segment Tree, DSU, Trie, Sparse Table, and could only accomplish some simple applications.

  2. Graphs(especially problems related to paths): I've never finished any problem about shortest paths and weighted graphs. I've learned Dijkstra and Floyd in Data Structure Course. However I had never written them into code, and I've completely forget them after final exams last year:( There are so much knowledge, definitions and skills in Graph, and I don't know where to start.

  3. Combinatorics: Most of the time I cannot come up with good ideas in combinatorics or counting problems. My thoughts of classifying different conditions are either too complex or messy, makes me feel hard to gather the answers up.

  4. Strings: For example, some problems about counting substrings or subsequences, string hashings.

  5. Searching: This should be the worst part of me. Firstly I'm not skilled at writing DFS/BFS in matrices or graphs, and also I cannot make up my mind of how to make a correct searching. I usually encounter situations which my code doesn't output results in my expectations. Weak abilities in implementations troubles me a lot. (My ability in searching maybe only reached $$$1300$$$ lol)

These days I'm trying learning new things by randomly picking up problems with difficulty in $$$[1800, 2200]$$$. I tell myself to insist thinking as much as possible. I only look at the editorial when my thoughts can't go forward anymore, and I never directly copy codes from solutions or other submissions.

Sometimes the process goes smoothly. For example I solved 2136F1 - From the Unknown (Easy Version) and 2097C - Bermuda Triangle by myself during the contest time and gave me lots of contest ratings. (Here are my submissions: 336010636, 317323768)

However most of the time, my attempt towards a problem ends up with seeing editorial, even if I would spend hours on thinking before looking for solutions. It's hard for me to completely solve a problem independently. Luckily turning solutions from editorial into my own AC code also let me learned a lot. For example, yesterday I solved 2136E - By the Assignment and 2093G - Shorten the Array with the help of editorial. Writing codes is also hard, so they spent me 6 hours in total. (Here are my submissions: 336091153, 336169572) I learned tarjan algorithms for SCC, 2-coloring for judging whether rings with odd length exist, and 01-trie for dealing with xor pairs. These were things I never learned before.

I'm concerning about whether this method of learning is really efficient or not. (Because most of the problems are beyond my ability of independent solving) And I don't know what are more things I should learn. There are still a quantity of knowledge I don't know, and I wonder where should I focus on and start with.

My goal is to reach Candidate Master ($$$1900$$$ Contest Rating) in one or two months. I'm willing to pay time on learning. Could anyone give me some advice please?

  • Vote: I like it
  • +33
  • Vote: I do not like it

| Write comment?
»
12 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it
»
12 months ago, hide # |
 
Vote: I like it +3 Vote: I do not like it

Can you share code for problem E?

»
12 months ago, hide # |
 
Vote: I like it +3 Vote: I do not like it

Bro, the topics that you said you need help with are exactly the topics of USACO Gold, I suggest having a look at them there Usaco Gold

»
12 months ago, hide # |
 
Vote: I like it +3 Vote: I do not like it

I think the way you practice is great! That's also what I try to do most of the time. I think that not solving a problem during practice is not necessarily bad, since you might learn a new idea that you didn't know about before.

If you think you struggle with implementation a good idea would be looking up other participants' submissions to see how they implement their solutions (I would suggest jiangly, since his code is very clean)

About topics to learn, the way I usually go about it is that if I see that I might need some data structure/algorithm to solve a problem, I will try to find a template/understand how it works while attempting the problem, basically I don't try to learn by topic (and I see that you already know the most common ones either way like BIT, segtree and DSU), but I will learn a topic if I need it to solve a problem. In my opinion recognizing when to use a technique/data structure is a lot more important than just knowing how to use it.

  • »
    »
    12 months ago, hide # ^ |
     
    Vote: I like it 0 Vote: I do not like it

    Thank you so much for your suggestion! I didn't try to look up submissions from other participants before. I will try to do this in the future. Have a nice day! ^_^

»
12 months ago, hide # |
 
Vote: I like it +3 Vote: I do not like it

you are having good growth

»
12 months ago, hide # |
Rev. 2  
Vote: I like it +8 Vote: I do not like it

Learn more advanced topics and improve your implementation skill, and your rating would probably skyrocket. What you lack is definitely not problem-solving skill but knowledge, since you have great mathematics background but can't even do searching well.

  • »
    »
    12 months ago, hide # ^ |
     
    Vote: I like it 0 Vote: I do not like it

    Thanks for your suggestions! I will try to improve my implementation skills and learn more necessary things.

»
12 months ago, hide # |
 
Vote: I like it +3 Vote: I do not like it

I agree that what you're lacking is not the problem-solving skills but the knowledge. When you are filling the gaps in your knowledge, I think you should check the tags, hints, or editorials more frequently to quickly identify and learn the specific knowledge areas you are unfamiliar with, and to waste as little time as possible on the sections you are already relatively familiar with.

Please note that this is only a temporary strategy. In the long run, the strategy you mentioned in your blog is more effective for improving your skills.

Sorry for my poor English.

  • »
    »
    12 months ago, hide # ^ |
     
    Vote: I like it 0 Vote: I do not like it

    Thank you so much! I agree with this opinion, learning more knowledge I'm currently unfamiliar with is important and useful right now.

»
12 months ago, hide # |
 
Vote: I like it +4 Vote: I do not like it

I also learned about bit trie after 2093G - Shorten the Array. It is funny that I managed to solve it with unordered map with a less colision-prone hash.

I would also suggest looking at jiangly's submissions as catgirl did, though my progress is much less impressive than catgirl. I usually study others' submission when I finished a problem myself to see what can be improved.

I also found useful to not bind to jiangly's submissions exclusively, especially for older problems, when he was less experienced. I remember solving 1696D - Permutation Graph from 2021 using jiangly's approach for next min/max from some of his 2022 submissions which I had seen before. And jiangly himself did not solve this problem during that round.

  • »
    »
    12 months ago, hide # ^ |
     
    Vote: I like it 0 Vote: I do not like it

    Wow, what a coincidence! I just did 1696D - Permutation Graph recently with recursion and Sparse Table (336264200), and the editorial says there exists a better solution with lower time complexity. Thanks for suggestions, seems lots of people think looking at other submissions are useful, I will do this in the future too.

»
12 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Looking at solution explanations is not a wrong thing to do. For me, I don’t think I can rely solely on my own ability to solve a problem that I’ve been stuck on for one or two hours. On the contrary, reading and understanding the solution might actually be more helpful to me. Sorry for my not-so-good English.