How do I optimize my code with increasing run time efficiency?
This is a codechef problem (link given above).
Also few of the subtasks have been achieved but few are not
The following is the link to my code:
wow, see the constraints, its 1e18 which wont fit in int. Write #define int long long (and u will also have to change int main() to signed main() )
On the top and try submitting it, if ur code is write then it should work
Or you can write like this:
#define int long long int
int32_t main()
{
return 0;
}
yup that too can be a way
Haha that’s what i do as well
did you think this was from current long challenge too?
LOL i also thought that for a moment but then i clicked the solution link and it showed me his solution so no way it was from on going contest
Same here \hspace{0mm}
Because he is replacing int with long long int.
Now int main will be replaced with long long int main. And that won’t work.
Becoz there is no such thing as long long int main() , it has to have a return type of int and since u declared int as long long , the other way to have int return type u can used signed keyword
giving me a runtime error SIGCONT
how do i fix that?
same error with @saurabhshadow 's code
the logic of the code is fine
SIGCONT error occurs when you exceed the printing time limit of IDE.
how to reduce the printing time limit?