[Community Puzzle] Blowing Fuse

https://www.codingame.com/training/easy/blowing-fuse

Send your feedback or ask for help here!

Created by @java_coffee_cup,validated by @bbb000bbbyyy,@Niako and @GeoConHD.
If you have any issues, feel free to ping them.

Hi there, i’ve been trying to solve this puzzle but i think i found an error on the expected result on the Case 04 ( More Devices ) or in the instructions: According to instructions one click will turn the device ON and a second will turn it OFF. Do it in by hand if thats the case:

Clicks - Device
1 - 10
2 - 0 - 10
3 - 10 - 0 - 14
4 - 0 - 10 - 0- 14
5 - 10 - 0 - 14- 0 - 14
6 - 0 - 10 - 0- 14 - 0 - 15

That means the Max AMP consumption is 39Amps when i click 6 times. and the answer was 49? then i think im missing something or the instructions should be clearer, because with that it never hits 49amps, could you clarify?

Thanks in advance

By input line 3,
the first click is on device #4, which consumes 14 units.

1 Like

Instructions should be clearer, i really didn’t understand your reply ( your reply just confirms what i posted )

Intructions:
Each click on a button will toggle the power status - when the power is OFF, a click will turn it ON. The next click will turn it OFF. ( did you mean first click turns it on, second turns it off, then third turns off and stays off the rest of the clicks?, because the way the instructions are is: that is on next click will turn off and so on and in that way, this remains and it never hits 49amps not even with 6 clicks

first click - On first device 10amps - 10 amps total
second click - off first device and on second device 10amps - 10 amps total
third click - on first device 10amps, off second device, on third device 14 amps - 24amps total
fourth click - off first device, on second device 10amps, off third device, on fourth device 14amps - 24amps total
fifth click - on first device 10amps, off second device, on third device 14amps, off fourth device, on fifth device 14amps - 38amps total
sixth click - off first device, on second device 10amps, off third device, on fourth device 14amps, off fifth device, on sixth device 15amps - 39Amps total

In that test case,
according to instruction, the first click is not clicking on the first device.
It is clicking on the 4th device, because the third line reads: 4 3 3 5 4 1 5…
The second click is on the 3rd device.

2 Likes

Hi there,

I’m a bit confused…I pass all the test but when submitting the first validator always fail !!!

I’ve been searching the cause but really don’t find it ??

If someone as the same problem or an idea ?

Thanks
Philippe

Only fails the first validator, or fails all validators?

Hi,
I wrote my code in c++ and passed all test cases.
However, every time I submit the same piece of code, my code fails some validator.
Like, first submission fails validator 5, second submission fail validator 1 and 4.
I do not know how to solve this problem, can someone help me please?
Thank you.

Do you mean, when submitting “the same piece of code” at different times it randomly fails some different validators?

Sounds like magic! :woman_mage:

Yes, that is the case. I am wondering why.

@billysin2017 Interesting! If you send me your code in PM, I’ll have a look at that.

When I submit, i don’t have my results, it’s loading indefinitely. Yet I passed all tests before submitting.
Any idea ?

It’s ok

Please make an example when the fuse is not blown. I don’t understand AT ALL how clicks are made, and what’s the difference between m, n and mx, nx. Should mx, nx be arrays?

There is a “Not blown” example in Testcase 02.

m and n are the counts of elements in the two arrays.

mx is a var name for one of the elements in an array. Because it is created in a loop, there will be m such elements.
You should define your array or list structure before the loop, and then in the loop put the mx value into the structure. After the loop, your structure will be filled up with data.

Same for nx.

If you need further help, tell us what language you are using.
Happy learning.

Hi all,

I past all test and all validator except the first validator :scream:

Why ? :disappointed_relieved:

The “Not blown” input data are not written, so I don’t understand what devices are turned on and which off. I use VB, if you need it.

If you mean you cannot see the “Not Blown” test case input data, the rescue is simple - find the top-right icon to click into.
Image1
You can see all test cases and their expected answers.

Is it what you need?

1 Like

OK, I understood. But in all “not blowns” I have “expected nothing found nothing”. Also, for some reason, I cannot copy anything from of paste anything to the code window, neither I can publish the solution. I’m using Chrome Android, cannot access my PC in short term.

I cannot copy anything from of paste anything to the code window, neither I can publish the solution. I’m using Chrome Android

“Chrome Android” - are you using a tablet or a mobile phone to access this site? This site’s online IDE does not work when the screen width resolution is below certain limit. My ipad browser allows viewing but not editing.

Yeah, a tablet. I can edit the code (I don’t see what do I type though, I have to review it after clicking outside of the code window). What about that error?