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 | 3985 |
2 | jiangly | 3814 |
3 | jqdai0815 | 3682 |
4 | Benq | 3529 |
5 | orzdevinwang | 3526 |
6 | ksun48 | 3517 |
7 | Radewoosh | 3410 |
8 | hos.lyric | 3399 |
9 | ecnerwala | 3392 |
9 | Um_nik | 3392 |
# | User | Contrib. |
---|---|---|
1 | cry | 169 |
2 | maomao90 | 162 |
2 | Um_nik | 162 |
4 | atcoder_official | 161 |
5 | djm03178 | 158 |
6 | -is-this-fft- | 157 |
7 | adamant | 155 |
8 | awoo | 154 |
8 | Dominater069 | 154 |
10 | luogu_official | 151 |
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.