You are not logged in. Please login at to post your questions!


problem in understanding limit for value of "a" in NUKES problem?

The problem NUKES, in this problem the value of "a" can range up to 1000000000 but some programmers have used integer array to store the values of a,n and k and still got accepted. you can see it in this problem. How is this possible.

asked 16 May '16, 19:09

arpit728's gravatar image

accept rate: 10%

You can store up to approximately $10^9$ in integers.


answered 16 May '16, 19:48

debjitdj's gravatar image

accept rate: 31%

@debjitdj not possible in c language, integer ranges upto 32767

(18 May '16, 16:59) arpit7282★

Nop dude. In gcc int is 4 bytes. Google it.

(18 May '16, 19:44) debjitdj4★

Size of int is not strictly specified in the C standards. The standards guarantees only that char is at least 8 bits, int at least 16-bit, long at least 32-bit and long long at least 64-bit (or something equivalent to those capacities). The typical distribution is {8,32,64,64}, but I've run into issues before with an old judging system running 32-bit SPARC where it is {8,32,32,64}. I would be surprised though is you found any judge system where int is 16-bit.

(26 Apr, 20:34) algmyr7★
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported
  • mathemetical formulas in Latex between $ symbol

Question tags:


question asked: 16 May '16, 19:09

question was seen: 945 times

last updated: 26 Apr, 20:34