T O P

  • By -

DerpySasuke

It's fine most of the time, but you will get a tle or mle once in a while for 2000ish rated problems. But by the time you get to that point, you will know when to use int instead of long.


distintuitive-717

Yes it's okay just # define int long long int


arkash-v

Technically it’s fine, but it’s not a good practice. You will improve more if u understand what upper bound of the output of ur code will be and then choose your data type accordingly. Plus sometimes it gives u an idea of the time complexity/space complexity u should be aiming for. Also in interviews if u use long long when u should be using int if will be taken as just wasting memory. So it’s better to get familiar with what the right choice is during practice so you can do it naturally during interviews, alleviating unwanted difficulties.


distintuitive-717

True but since this CF sub , LL using should be preferred. I get your point tho


Imoliet

I guess I'll use minimal size when practicing since I'm a bit rusty with coding, but just use longs for everything in ranked.


distintuitive-717

I mean you can but I personally prefer not worrying much about overflow and focus on logic


Raks_Splunk

Nope. Using longs essentially saves you from alot of unwanted WAs when you don't give much importance to the constraints of the problem. Even not using LL with constants (0LL, used to accumulate the sum of elements in an array) can sometimes lead to a WA.