Undefined behaviour of unsigned long long int [on hold]











up vote
-4
down vote

favorite












I was doing this problem in November circuits, due to big data constraints
i used unsigned long long int datatype which led to wrong answer in all my test cases. After a lot of debugging when i changed the datatype to long long int, then my code passed all the test cases. What is so wrong with unsigned long long int??
my code










share|improve this question













put on hold as off-topic by Martin R, Graipher, 200_success, Toby Speight, Deduplicator yesterday


This question appears to be off-topic. The users who voted to close gave these specific reasons:



  • "Code not implemented or not working as intended: Code Review is a community where programmers peer-review your working code to address issues such as security, maintainability, performance, and scalability. We require that the code be working correctly, to the best of the author's knowledge, before proceeding with a review." – 200_success, Deduplicator

  • "Authorship of code: Since Code Review is a community where programmers improve their skills through peer review, we require that the code be posted by an author or maintainer of the code, that the code be embedded directly, and that the poster know why the code is written the way it is." – Martin R, Graipher, Toby Speight


If this question can be reworded to fit the rules in the help center, please edit the question.









  • 2




    Welcome to codereview. The question "why does it work?" or "why doesn't it work?" is off-topic for codereview, and would be better suited for stackoverflow.com . If you want a review of the working version of your code, please note that the code must be included in the post itself, rather than behind a link: codereview.meta.stackexchange.com/a/1309/22697
    – user673679
    yesterday










  • I thought codereview was the appropriate platform for this, but ok, so i will post this in stackoverflow.
    – vaibnak
    yesterday















up vote
-4
down vote

favorite












I was doing this problem in November circuits, due to big data constraints
i used unsigned long long int datatype which led to wrong answer in all my test cases. After a lot of debugging when i changed the datatype to long long int, then my code passed all the test cases. What is so wrong with unsigned long long int??
my code










share|improve this question













put on hold as off-topic by Martin R, Graipher, 200_success, Toby Speight, Deduplicator yesterday


This question appears to be off-topic. The users who voted to close gave these specific reasons:



  • "Code not implemented or not working as intended: Code Review is a community where programmers peer-review your working code to address issues such as security, maintainability, performance, and scalability. We require that the code be working correctly, to the best of the author's knowledge, before proceeding with a review." – 200_success, Deduplicator

  • "Authorship of code: Since Code Review is a community where programmers improve their skills through peer review, we require that the code be posted by an author or maintainer of the code, that the code be embedded directly, and that the poster know why the code is written the way it is." – Martin R, Graipher, Toby Speight


If this question can be reworded to fit the rules in the help center, please edit the question.









  • 2




    Welcome to codereview. The question "why does it work?" or "why doesn't it work?" is off-topic for codereview, and would be better suited for stackoverflow.com . If you want a review of the working version of your code, please note that the code must be included in the post itself, rather than behind a link: codereview.meta.stackexchange.com/a/1309/22697
    – user673679
    yesterday










  • I thought codereview was the appropriate platform for this, but ok, so i will post this in stackoverflow.
    – vaibnak
    yesterday













up vote
-4
down vote

favorite









up vote
-4
down vote

favorite











I was doing this problem in November circuits, due to big data constraints
i used unsigned long long int datatype which led to wrong answer in all my test cases. After a lot of debugging when i changed the datatype to long long int, then my code passed all the test cases. What is so wrong with unsigned long long int??
my code










share|improve this question













I was doing this problem in November circuits, due to big data constraints
i used unsigned long long int datatype which led to wrong answer in all my test cases. After a lot of debugging when i changed the datatype to long long int, then my code passed all the test cases. What is so wrong with unsigned long long int??
my code







programming-challenge c++14






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked yesterday









vaibnak

205




205




put on hold as off-topic by Martin R, Graipher, 200_success, Toby Speight, Deduplicator yesterday


This question appears to be off-topic. The users who voted to close gave these specific reasons:



  • "Code not implemented or not working as intended: Code Review is a community where programmers peer-review your working code to address issues such as security, maintainability, performance, and scalability. We require that the code be working correctly, to the best of the author's knowledge, before proceeding with a review." – 200_success, Deduplicator

  • "Authorship of code: Since Code Review is a community where programmers improve their skills through peer review, we require that the code be posted by an author or maintainer of the code, that the code be embedded directly, and that the poster know why the code is written the way it is." – Martin R, Graipher, Toby Speight


If this question can be reworded to fit the rules in the help center, please edit the question.




put on hold as off-topic by Martin R, Graipher, 200_success, Toby Speight, Deduplicator yesterday


This question appears to be off-topic. The users who voted to close gave these specific reasons:



  • "Code not implemented or not working as intended: Code Review is a community where programmers peer-review your working code to address issues such as security, maintainability, performance, and scalability. We require that the code be working correctly, to the best of the author's knowledge, before proceeding with a review." – 200_success, Deduplicator

  • "Authorship of code: Since Code Review is a community where programmers improve their skills through peer review, we require that the code be posted by an author or maintainer of the code, that the code be embedded directly, and that the poster know why the code is written the way it is." – Martin R, Graipher, Toby Speight


If this question can be reworded to fit the rules in the help center, please edit the question.








  • 2




    Welcome to codereview. The question "why does it work?" or "why doesn't it work?" is off-topic for codereview, and would be better suited for stackoverflow.com . If you want a review of the working version of your code, please note that the code must be included in the post itself, rather than behind a link: codereview.meta.stackexchange.com/a/1309/22697
    – user673679
    yesterday










  • I thought codereview was the appropriate platform for this, but ok, so i will post this in stackoverflow.
    – vaibnak
    yesterday














  • 2




    Welcome to codereview. The question "why does it work?" or "why doesn't it work?" is off-topic for codereview, and would be better suited for stackoverflow.com . If you want a review of the working version of your code, please note that the code must be included in the post itself, rather than behind a link: codereview.meta.stackexchange.com/a/1309/22697
    – user673679
    yesterday










  • I thought codereview was the appropriate platform for this, but ok, so i will post this in stackoverflow.
    – vaibnak
    yesterday








2




2




Welcome to codereview. The question "why does it work?" or "why doesn't it work?" is off-topic for codereview, and would be better suited for stackoverflow.com . If you want a review of the working version of your code, please note that the code must be included in the post itself, rather than behind a link: codereview.meta.stackexchange.com/a/1309/22697
– user673679
yesterday




Welcome to codereview. The question "why does it work?" or "why doesn't it work?" is off-topic for codereview, and would be better suited for stackoverflow.com . If you want a review of the working version of your code, please note that the code must be included in the post itself, rather than behind a link: codereview.meta.stackexchange.com/a/1309/22697
– user673679
yesterday












I thought codereview was the appropriate platform for this, but ok, so i will post this in stackoverflow.
– vaibnak
yesterday




I thought codereview was the appropriate platform for this, but ok, so i will post this in stackoverflow.
– vaibnak
yesterday















active

oldest

votes






















active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes

Popular posts from this blog

Mont Emei

Province de Neuquén

Journaliste