# [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!

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

Why ?

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.

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?