Блог пользователя aabs08

Автор aabs08, 11 лет назад, По-английски

Link to Problem In this question we need to find the smallest possible number of resistors he needs to make an element using 1 ohm resistor The any solution which got accepted gives 6 as answer for test case a=6 b=5 (R=6/5) while this can be done using 5 resistors : 3 1 ohm resistor in series which is in parallel with 2 1 ohm resistor in series. So,I think the solution is wrong. Can someone justify the solution against this testcase?

  • Проголосовать: нравится
  • +4
  • Проголосовать: не нравится

»
11 лет назад, # |
  Проголосовать: нравится +7 Проголосовать: не нравится

You can't do that for this problem. It's considering these as elements 1. one resistor; 2. an element and one resistor plugged in sequence; 3. an element and one resistor plugged in parallel.

  • »
    »
    11 лет назад, # ^ |
    Rev. 2   Проголосовать: нравится 0 Проголосовать: не нравится

    Can you ellaborate on that plzz i am unable to get it .

    • »
      »
      »
      11 лет назад, # ^ |
      Rev. 2   Проголосовать: нравится +8 Проголосовать: не нравится

      For this problem, only way you can construct a circuit is to add one resistor in parellel or series to the circuit. You're not allowed to combine two circuits with more than one resisters.

»
11 лет назад, # |
  Проголосовать: нравится +3 Проголосовать: не нравится

The problem says "An element and one resistor plugged in sequence". It means there must be a basic resistor. It is impossible to plug two elements in sequence.

»
11 лет назад, # |
  Проголосовать: нравится -7 Проголосовать: не нравится

I'm fairly certain you're correct; there is, at least, a degree of ambiguity regarding the rules for building elements. (I asked a question to this effect during the contest.)

Although I think it was possible to guess the problemsetter's intention, since it has nice mathematical properties.

@ping/dwelling: how did you conclude that? The statement says that "an element and one resistor plugged in sequence" is an element. Hence, "an element and one resistor plugged in parallel" can mean "an 'element and one resistor plugged in sequence' and one resistor plugged in parallel", and so on. There's nothing to say you can't build elements like that.