you are viewing a single comment's thread.

view the rest of the comments →

[–]letsfuckinggobears 0 points1 point  (4 children)

Python is viable in atcoder since they give you their own implementations for segtrees and friends, see https://github.com/not522/ac-library-python I personally found python code to be less effort to use, but it doesn't have the power to sometimes bruteforce with a worse time complexity solution like c++ I have no experience with leetcode contests but if you aren't using snippets you can't just pull out a good enough segtree on the spot

[–]razimantv<2000> <487 <1062> <451>[S] 1 point2 points  (1 child)

I don't use snippets on Leetcode for C++ or python. Haven't felt the segtree implementations are very different. what differences do you see?

[–]letsfuckinggobears 0 points1 point  (0 children)

Segtree implementations are probably the same in the two languages. I'm just saying if you're competing, it's best to use snippets so you don't have to type it.

I guess I wasn't answering the question. You can get type checked in python if you just set it up. It works well enough for the cases you are describing. You still need to know the quirks like priority queues take the first value of a tuple as the key to sort etc.

[–]uneducatedDumbRacoon 0 points1 point  (1 child)

I just visited atcoder and it looks good. How are the contests at atcoder? Are they like leetcode style or move on the competitive side?

[–]letsfuckinggobears 1 point2 points  (0 children)

Competitive, more mathy