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

Автор Omar_Mekkawy, история, 8 лет назад, По-английски

i had this conversation with the Judge in the middle of the contest: http://imgur.com/a/HdXPc

"Masha writes all progression terms one by one onto the board (including repetitive) while condition |bi| ≤ l is satisfied (|x| means absolute value of x). There is an exception: if a term equals one of the "bad" integers, Masha skips it (doesn't write onto the board) and moves forward to the next term."

So masha writes on the board while |bi|<=l according to my English. Not masha generates the sequence while |bi|<=l and writes if the other conditions are satisfied.

similar approach sentence: i should go up while the light is on, does that mean if the light goes off and then on again i don't go up?

according to the problem settler, he should "STOP GENERATING" the sequence when |bi|<=l , which is not mentioned in the problem statement.

i sent the wrong solution as a test, after wasting the whole contest trying to find if my solution has something wrong,

in case you don't know why this would matter

test case: 10 0 9 1 1 answer : inf

judge's answer: 0

i hope this will be addressed.

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

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

you are right , it was a mistake in the statement and because of this problem i lost more than 1.5 hour

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

For some reason 1450 ppl got it right(at least before systests)

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

I also spent alot of time in the contest working in that case (pretest 14) until i figured out that they seem to mean the other meaning. I agree it was really a bad problem statement

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

I hope I just never participate this round this is my second chance to get purple.But I failed because the test14

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

Reasonable words

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

Actually, we thought that there is no ambiguity around the word "while". And we think that there are still no problems with this statement.

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

    I agree that there is no ambiguity in the word "while". When solving the problem, I treated it as a while() loop, which means that when the condition is not obeyed, we stop.

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

    you can read the blog and you will see what the people though , you can't judge us for doing what was exactly there in the statement

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

    actually apart from the statement itself when i was confused i went to check the sample cases if some thing would clear the confusion in the first sample test "In the first sample case, Masha will write integers 3, 12, 24. Progression term 6 will be skipped because it is a "bad" integer. Terms bigger than 24 won't be written because they exceed l by absolute value."

    "Terms bigger than 24 won't be written because they exceed l by absolute value."

    So i understood that the terms weren't written because all of them will be bigger than L not because only one term exceeded L

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

    does while (condition) write , means while(condition) stop generating a sequence ?

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

      Yes. Once when condition is not satisfied, loop is terminated.

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

        when the condition is not satisfied, i don't write the number , not terminate generating the sequence.

        Please read the example of the lamp in my blog for a better picture, it's normal we all do mistakes, we just have to admit them.

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

          Think, you just confused between "if" and "while".

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

            I'm not mistaking anything for anything, unless you think all the people thinking there was a problem with test case 14 are fools or something.

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

            Think, you just confused between "until" and "while". I know we are programmers and many people could understand what you meant (associating it with while loop) but the actual meaning of the statement isn't the one you intended to give it.

            Some discussion about it.

»
8 лет назад, # |
Rev. 3   Проголосовать: нравится -8 Проголосовать: не нравится

There is no problem in task.

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

English statement is wrong, but Russian statement is correct.

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

I coded 2 solutions each in 2 programming languages Python and C++ and made more than 10 submissions... :'(

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

Hey if you're not going to do anything about this, at least you owe us an apology, this is not meant to be ignored.

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

Well, I read the discussion. I must admit that the statement was not as clear as we want it to be. However, in this situation one should understand the meaning of this "while" just because it works like in any programming language, your understanding requires some special knowledge of subtleties of English.

I apologize that the statements was no so clear. In future, if you see any disambiguation, feel free to ask a question.