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

Автор TestTrial, история, 3 года назад, По-английски

I've spent quite some time figuring out why is it that for problem (8A - Поезд и Петя), instead of "forward" at test 14, my output is "both", but to no avail. Since the entire string is hidden and I am shown just a part of it, it's quite hard to understand where the mistake could be. Here is my submission: 95835050. Thank you in advance. Edit: Some flaws fixed but no real result yet 95837954

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

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

Consider input:

abcdefgh
abc
ab

you print both even though the answer is fantasy.

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

    Thanks for the hint, i added the condition (strstr(v,a1)!=rstrstr(v,a1) || strstr(v,a2)!=rstrstr(v,a2)), still no progress on test 14 though

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

      Can you write down the condition for a pattern to be possible forward? (ignore backward for now)