Is it going to be on the list from single player games?
It already is, in hard category
Bonjour,
Est-il normal que sur ce challenge (et je crois que câest le seul qui me ça) mon code ne soit pas sauvegardĂ© lorsque je le soumet?
Apres lâavoir soumis, lorsque je retourne sur la page du challenge tout le code a Ă©tĂ© rĂ©initialisĂ©.
Jâen Ă©tait a 90% de Vox codei-redux et je suis un peu triste dâavoir perdu 350 lignes de codes ><.
Donc avant de me relancer dans la rĂ©Ă©criture complĂšte je voudrais savoir si jâai fait une mauvaise manip ou si câest ce challenge qui a problĂšme (je nâai observĂ© ça sur aucun autre).
Salut Fred, pas de chance pour toi, cela ne mâest pas arrivĂ©. En gĂ©nĂ©ral, jâutilise un Ă©diteur externe, et je fais un copier-coller afin de ne perdre quoi que ce soit. Peut-ĂȘtre que lâIDE nâa pas retrouvĂ© tes infos de connexions et nâa pas pu associer ton code Ă ton compte. Est-ce que ta progression a Ă©tĂ© sauvĂ© dans les jeux ? En tout cas, bravo pour ton 90 %, jâen suis pour lâinstant Ă 70% sur ce puzzle.
Bah, jâai parlĂ© trop tĂŽt, jâai effectivement le mĂȘme comportement, je ne retrouve pas le code de ma derniĂšre soumission. Il sâagit donc bien dâun bug.
Merci pour la réponse, la progression a bien été enregistrée mais les 10 derniers % vont plus long que prévus à atteindre maintenant:(
Jâavais justement lâintention de passer par un Ă©diteur externe. Il me reste plus quâa tout rĂ©Ă©crire, ça me permettra de rĂ©flĂ©chir a mon algo pour rĂ©soudre le dernier test.
So did anyone manage to implement a working solution that pass any tests without a specific mechanism to bypass the last one?
If you still have trouble to find a working algorithm my solution is the following:
Explore every empty and âsoon brokenâ positions to find the place where a bomb will destroy the maximum amount of blocks that are not in the range of another bomb. (What I call a soon broken block is a block in range of a bomb already placed)
Then try to place a bomb at this location (do nothing if you are on a block that is not yet broken).
This solve any freindly test but fail at the last trap test.
To solve the last one, after placing any bomb I count the number of breakable blocks that are âaloneâ on the map (alone = you canât place a bomb that will destroy this block and another one, so you need a bomb only for this one).
And if I have less bombs left than the number of alone blocks, I backtrack and I run the algorithm to place a bomb again but I ignore the placements that will destroy the maximal number of blocks, so the new maximum is strictly less than the previous one.
Hope that helped ^^
@Tyra_El: Jâai rencontrĂ© le mĂȘme problĂšme sur un autre puzzle Je trouve dommage dâavoir Ă utiliser un IDE externe parceque celui intĂ©grĂ© au site est trĂšs efficace, donc jâespĂšre quâils arriveront Ă rĂ©gler ce problĂšme assez rapidementâŠ
Ils ont rĂ©solu le problĂšme, du moins je ne lâai plus revu. Mais maintenant par sĂ©curitĂ© je fais toujours une sauvegarde de mon code sur mon ordi, ou je code direct sur mon ordi et je transfĂšre sur codingame.
Sinon jâai fait le mĂȘme algo que toi, Ă lâexception que je ne cherche pas la position qui dĂ©truit le max de bloc, mais une position qui dĂ©truit au moins la moyenne de bloc Ă dĂ©truire (donnĂ©e par max(nb-bloc/nb-bombe,nb-bloc/round-3,1)), ce qui Ă©vite dâavoir a reparcourir toute la carte a la recherche dâun nouveau meilleur spot, je prend le premier spot qui nâisole pas de bloc et qui en dĂ©truit suffisamment.
Bein ils ont pas totalement rĂ©solu le problĂšme non : ça mâest arrivĂ© ce midi >_<
Sinon effectivement câest un bonne optimisation de ma version que tu as lĂ ^^
Solved it with some kind of bruteforce. Another way to describe it would be a greedy algorithm over 2 turns. Greedy on 1 turn will beat everything except the last one. For the last one you need to see 2 turns ahead because the 1 turn ahead max screws you.
Are you talking of the first puzzle (static nodes) or the second one (moving nodes) ?
With the moving nodes, Iâm thinking of the same approach but I think this would fail (I didnât implement it yet). As the nodes can move, maybe at this turn thereâs a node âaloneâ but it (or another one) will move and will not be alone anymore âŠ
It was good fun coding this hard puzzle.
Obviously brute force didnât pass, finally I found a trick to eliminate a lot of possibilities by going from the maximum of possible destroyed nodes then downwards.
However I donât think that this would solve any kind of solutions if the number of turns was drastically reduced (turns < bombs + 3)
I actually wrote a really neat and simple Backtracking algorithm.
My Algorithm passes all the test case except the Destroy CG test case. Somehow its too slow and explores a lot of option.Any help ? I tried optimizing but seems that its not enough.
Btw here is my replay of the last testcase: https://www.codingame.com/replay/solo/71958303
I manage to solve all example test cases, but fail on case 8 and 11 after submitting. It looks like I run out of time. This surprises me, especially for case 11 which looks exactly like the example test case 11 (before submitting) that my program can solve. Anyone experiencing the same problem? Any ideas?
Edit: Never mind. It looks like both cases were on the edge of the allowed time. After little more tuning, I could speed my program up by 10% and now all test cases pass also after submitting.
The animation isnât working for me anymore, I get a black/gray image with â80â in the bottom right corner and thatâs it
I tried other puzzles and they were working fine.
Bonjour Tout le monde,
Je vous contacte car jâai un problĂšme de pointeur sur ma recherche dâarbre, voici la suite des adresses dâun vector :
0x664af0
0x664ed8
0x6652c0
0x6656a8
0x665a90
0x665e78
0x7ffff7fc4410
Es ce que câest normal que la taille de lâadresse change de longueur ? Je vous remercie,
0x664af0 = 0x000000664af0 = 0x0000000000664af0 = ...
Tes adresses ne changent pas de taille, mĂȘme si la derniĂšre fait effectivement un bond en avant de mauvais augure pour ton code. Difficile toutefois dâen dire plus avec cette simple liste.
speak in english please. how did you print those values? The last one look like vec.end(), a special adress you musnât go to. (if youâre using C++)
Iâve got this message when I Run my code done in VB.Net :
Informations :
Connecting to firewall.norsefire.gov.uk ⊠[OK]
Sortie dâerreur :
4 3
âŠ
.@âŠ
âŠ
15 1
Stacktrace:
at <0xffffffff>
at VoxCodei/TMap.NextInstruction (int,int) [0x00180] in /tmp/Answer.vb:121
at VoxCodei.Main () [0x001c7] in /tmp/Answer.vb:419
at (wrapper runtime-invoke) object.runtime_invoke_void (object,intptr,intptr,intptr) <IL 0x0004c, 0xffffffff>
Native stacktrace:
Sortie standard :
- Assertion at method-to-ir.c:3606, condition
klass->rank == 0' not met Informations : invalid input. Expected 'x y' but found '* Assertion at method-to-ir.c:3606, condition
klass->rank == 0â not metâ
In Microsoft Visual Studio, I have no problem.
Can someone tell me what to do ?
I have same problem