• [1063] Fleabag VS. Mutt

  • 时间限制: 1000 ms 内存限制: 65535 K
  • 问题描述
  • Fleabag VS. Mutt is an old flash game for children. Nowadays, it also has app on Android.

    You can try to play it.

    We consider that Fleabag and Mutt are on the same height and they have a distance D. The wind resistance is F (If F < 0, the wind is from Mutt to Fleabag, or it will be from Fleabag to Mutt). Fleabag or Mutt will give their hidden weapon an initial velocity (both horizontal and vertical).

    Both on horizontal side and vertical side, we can consider the weapon is on a uniformly accelerated motion on its two directions and G is 9.8.

    Here are two formulas:

    a = F / m

    s = v0t + (1/2)(at^2)

    If the weapon hit the area that the distance to another one is less than 2.0, we consider it hit another one.

  • 输入
  • This problem contains several cases, input until EOF.
    Each case contains follow data:
    A string that indicates the name of attacker (Fleabag or Mutt), a float D (0 < D <= 100), a float F (-100 <= F <= 100) and a float m (0 < m <= 10, indicates the m of weapon). The initial velocity of horizontal H and vertical V (0 < H, V <= 100.0).
  • 输出
  • If it will hit another one, print YES. Otherwise, print NO.
  • 样例输入
  • Fleabag 1.0 1.0 1.0 1.0 4.9
  • 样例输出
  • YES
  • 提示
  • 来源
  • XadillaX
  • 操作