|
|
вернуться в форумI've tried to solve this problem, using simple aproach, only one array in which i remember time until that part of the memory is allocated. On request I check if it's used, if is shift time to new value if not nothing change... On new allocation I search for the first free memory spot... Very simple, straight from the text, but I get WA on #4. Could someone post some tricky test or explain why my algorithm is wrong? Thank you very much! I wouldn't say that it was very easy, but I got AC and learn new way of programming. Try this test: 64999 + 65000 . 1 --------- 1 + |
|
|