I'm currently targeting Div2D Problems and since Div2d sometimes needs some Data structures/algos, i just want to ask do you guys Implement big codes everytime or you just copy some templates and modify them according to the question in a contest?
# | User | Rating |
---|---|---|
1 | tourist | 4009 |
2 | jiangly | 3823 |
3 | Benq | 3738 |
4 | Radewoosh | 3633 |
5 | jqdai0815 | 3620 |
6 | orzdevinwang | 3529 |
7 | ecnerwala | 3446 |
8 | Um_nik | 3396 |
9 | ksun48 | 3390 |
10 | gamegame | 3386 |
# | User | Contrib. |
---|---|---|
1 | cry | 164 |
1 | maomao90 | 164 |
3 | Um_nik | 163 |
4 | atcoder_official | 160 |
5 | -is-this-fft- | 158 |
6 | adamant | 157 |
6 | awoo | 157 |
8 | TheScrasse | 154 |
8 | nor | 154 |
10 | djm03178 | 153 |
I'm currently targeting Div2D Problems and since Div2d sometimes needs some Data structures/algos, i just want to ask do you guys Implement big codes everytime or you just copy some templates and modify them according to the question in a contest?
Name |
---|
for me,I write my code every time
I think it's uncommon for recent div2D's to require anything bigger than a fenwick tree though.
I was solving an old 2c problem and it required segment tree with lazy propogation and I was feeling so lazy to implement it so I asked
Maybe that's why it is named lazy propogation lmao
Can you show a link? I get the feeling that it doesn't require lazy propagation, it's just that you came up with a solution that has lazy propagation.
52C - Circular RMQ I just studied segment tree and I haven't solved this problem yet so yeah i may be wrong
Ok yeah, in this problem lazy propagation is probably the most common solution. However I don't think "Codeforces Testing Round #1" can be equated to a Div. 2 round.
Anyway for your original question, it depends on the algorithm, length of the code and how comfortable I am with it too. Lazy propagation I usually write myself.
I write them everytime to practice implementing and debugging, even while I'm participating in contests.
Yes, of course. I am righting them again, again and again. In the contests too. For me rating doesn't matter, I participate in contests for increase my implementation skills, not for copy paste skills.
we need another
relation between rating and ***
researchCopying templates is much faster and less mistake-prone. The more of it you can do the better.
You definitely need to understand the code though, so it's best to write your own library. Also, if you are only trying to learn, it can be helpful to write algorithms from scratch, until you are very comfortable with the implementation.