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
programming-challenge c++14
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.
add a comment |
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
programming-challenge c++14
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
add a comment |
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
programming-challenge c++14
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
programming-challenge c++14
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
add a comment |
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
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
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