hey, try this Bisection method
I think my method is correct within my code, as the first few levels I can pass. However, when I get to the last level, âNot here?â, My code crashes due to the load of so much memory. The Arrays I am using will not take the amount of information I need to store a single boolean for each window- there is a heap size error.
Has anyone has simmilar problems? Or do I need to think of a different strategy, or use a different data structure?
Thanks1
(PS: I am using Java, if this helps)
Open debug mode, helps visualizing how you should represent different possibilities. One boolean for each window is too much.
Hint: you need only 4 values, whatever the test is
Ok Thanks, I will try another way!
Same problem. =\
Hello, Iâm having an odd problem. I pass all tests, including âTest 4 - Towerâ:
[screenshoot]. But when I submit my code [screenshoot] it says I failed âTest 4 - Towerâ. Why do I pass this problem when testing but I fail the exact same problem when I submit the code?
The arguments youâre using to initialize your BinarySearch objects are slightly wrong and Iâm almost sure youâll facepalm when you find the fix. I donât want to spoil you, but think about what the starting position implies.
Oh no, I facepalmed myself indeed hahaha⌠you were right, I was initializing my BinarySearch objects with an index that had already been proved wrong. Now Iâm able to pass all tests and to score 100% when submiting. Thanks for your help! (:
ps: I removed the link to my code, because it could be easily fixed and used as a full working solution.
simply check 3 variants of maxCoord-minCoord:
0
1
another
Here is my code.
Edit: No full code
It passes the Correct cutting validator but not the Correct cutting test.
Note: This is my first post here. Go easy one me.
Donât forget to add +/- 1 in your max() too.
E.G : yMin = max ( yMin , cy+1 );
Thanks.
[quote=âinb4broadsword, post:13, topic:264, full:trueâ]
passed every test, on puzzle choosing screen it says 60\60 CP (whatever that it), 2\2 achievements, but 0% done. why?[/quote]
For me, itâs the opposite : I passed every test. When I send my code, itâs written âValidating your program and computing scoreâŚâ and nothing happensâŚ
When I come back on the page of puzzle choosing, it says 100% but 0 CP and 0 achievemments.
I suppose I have just to wait ?
(sorry if I made mistakes, Iâm not a native speaker)
hi!
anybody willing to supply me some debug info. i implemented some kind of bisection but it doesnt pass the last test. all others get completed but some of them with 0 rounds left. can you post your number of rounds left for each test case so I can compare?
regards
I believe that some people need to write the âmax()â equation with an added trick depending on whether their code does integer division via merely truncating the value past the decimal point, as opposed to using float and then rounding up. In C#, â(max - min)/2â will not pass the evasion test.
Hi there,
I do not know if this has been mentioned before but some test cases unfortunately do not follow all the constraints provided in the problem statement ( namely âThe Towerâ and âA lot of jumpsâ test cases). They provide a width that doesnât satisfy the condition in the problem statement which is: 5 ⤠W ⤠10000.
I suppose it was meant to be 1 ⤠W ⤠10000 for the width constraint.
Happy new year !
yes!
but the problem is more that the compiler this game uses rounds UP always up when using C# when it natively (compiled in VS2015) does round down. this gave me a bit of a headache until i heavily .Error commented my tests.
You really shouldnât need to create your own 2D array to store all of the values. Just try to work in terms of coordinates. You donât need to keep track of every spot youâve checked, just the boundaries of where youâve checked, which you can do with just a few integers!
I have successfully hard coded the last test.
Has anyone before me did it?
I have noticed if i try to hard code, the expected values of tests changes randomly, but i manage to hard code the results successfully. Do you consider it as a bug?
The goal of puzzles is not to hardcode themâŚ
When you submit your code, it is evaluated with different validators than in the IDE.