for the sake of not having to write long long many times, i define it above the program as
typedef long long ll; and this work fine but,
#define long long ll this does not work.
how to define short forms using #define?
for the sake of not having to write long long many times, i define it above the program as
typedef long long ll; and this work fine but,
#define long long ll this does not work.
how to define short forms using #define?
use
#define ll long long int;
I prefer to change the int
i use #define int long long int
for this you have to make one more change
use int32_t here
int32_t main(){
}
ok.Another doubt.
when i declare the arrays like a[1000005] in int main, it gives compilation error or segmentation fault.
but when i declare it above int main like just below using namespace std; it works fine. Why?
this is because for any function there is memory limit
inside function you can’t declare array of size more than 10^6
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.