ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1001. Reverse Root

describe 128*1024 ? about memory management
Posted by Noushad Bhuiyan 3 Sep 2018 09:03
I tried hard and hard but was getting runtime error: access violation again and again because of not taking proper size of array. at last I used a[128*1024] by a solution of a discussion. and it worked. but how it was done? I mean I didn't get the clue line of question " A size of the input stream does not exceed 256 KB. "

can you help me?
Re: describe 128*1024 ? about memory management
Posted by ToadMonster 3 Sep 2018 13:30
256KB of chars - like "1.2 11 1". Here are 3 numbers take 8 bytes.
Size of minimal double representation is 2 bytes - "1 ". So 256K chars can be 128K doubles.