THREEDIF_Compilation Error

Well my following code is accepted but i have a doubt.When i try to submit it using #define and not by declaring “mod”(refer code) as a variable,it is giving a compilation error.Why is it so?Please help.

http://www.codechef.com/viewsolution/2401053

dont put a semi-colon after the define statement…i.e. define like this:-

#define MOD 1000000007

hope this helps…:slight_smile:

1 Like

Preprocessor would replace

 ans=((a[0])%mod)%mod;

by

ans=((a[0])%1000000007;)%1000000007;;

and you can see it is invalid.

Preprocessor directives are delimited by line breaks and not semi-colons.

1 Like

thnx kunal361 and bugkiller :slight_smile:

If you’re done with this question, hit green tick on any answer and then close the question. :slight_smile:

//