League of Legends
题号:NC222899
时间限制:C/C++/Rust/Pascal 1秒,其他语言2秒
空间限制:C/C++/Rust/Pascal 256 M,其他语言512 M
64bit IO Format: %lld

题目描述

QAZ likes to play League of Legends and watch league matches as well.

He thinks the double-elimination system of this year's league matches is not fair, so he invented a pro-double-elimination system.

Specifically, in his system:

  • There are three teams competing with each other.
  • Firstly, two teams are selected with equal probability and compete.
  • In each round, the losing team temporarily leaves, and the winning team continues to play against the other of the three teams that did not participate in this round.
  • When a team loses two round in total, the elimination competition ends.
  • For the sake of simplicity, any two teams have a 50% chance of winning against each other.
  • Now please find out the expected number of rounds in this elimination competition.

输入描述:

No input.

输出描述:

Print exactly one line consisting of a real number, rounded to the first decimal place, that represents the expected number of rounds in the QAZ‘s elimination competition.