Please read the new rule regarding the restriction on the use of AI tools. ×

EmonRezaBD's blog

By EmonRezaBD, history, 4 years ago, In English

Hello Everyone,

In my template I use macros like #define ll long long int and many others.

But I found on web that it takes more memory and it is wise to use typedef long long int ll or using ll=long long int
I am confused. Which will be efficient for time as well as memory. Please help me. Thanks in advance.

  • Vote: I like it
  • -12
  • Vote: I do not like it

| Write comment?
»
4 years ago, # |
  Vote: I like it 0 Vote: I do not like it

Here somebody wrote a useful comment.

»
4 years ago, # |
  Vote: I like it -20 Vote: I do not like it

They're both wrong, use #define int long long

»
4 years ago, # |
  Vote: I like it +20 Vote: I do not like it

Not a lot of people outside China know this, but there is actually a very simple trick you can use to speed up your code. To use it just simply write

#define int64_t bool

And now all your long longs are booleans, and you can put them in a bitset. Good luck!