Logo
(追記) (追記ここまで)

20215번 - Cutting Corners 스페셜 저지다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 512 MB21061803173586.062%

문제

A large coffee spill in the warehouse of the Busy Association of Papercutters on Caffeine has stained the corners of all paper in storage. In order to not waste money, it was decided that these dirty corners should be cut off of all pieces of paper.

A few members loudly proclaim that cuts should be made diagonally, while other members say that cutting the corner out as a rectangle is the better option. Both parties claim their method is better.

You decide to end this discussion once and for all, telling the rectangle-cutters that their method is slower. You set out to show them the following: given a piece of paper which has a $w$ by $h$ corner that is stained with coffee that needs to be to cut off, how much more effort is it to cut out the whole rectangle compared to cutting along the diagonal?

입력

The input consists of:

  • A line containing two integers $w$ and $h$ (1ドル\leq w,h\leq 100$), representing the width and height of the corner respectively.

출력

Output how much longer you have to cut if you cut out a rectangle, compared to cutting along the diagonal. Your answer should have an absolute or relative error of at most 10ドル^{-6}$.

제한

예제 입력 1

3 4

예제 출력 1

2

예제 입력 2

12 7

예제 출력 2

5.107556011

예제 입력 3

1 1

예제 출력 3

0.585786438

힌트

출처

ICPC > Regionals > Europe > Northwestern European Regional Contest > Benelux Algorithm Programming Contest > BAPC 2020 Preliminaries C번

  • 문제를 만든 사람: Mike de Vries
(追記) (追記ここまで)

출처

대학교 대회

  • 사업자 등록 번호: 541-88-00682
  • 대표자명: 최백준
  • 주소: 서울시 서초구 서초대로74길 29 서초파라곤 412호
  • 전화번호: 02-521-0487 (이메일로 연락 주세요)
  • 이메일: contacts@startlink.io
  • 통신판매신고번호: 제 2017-서울서초-2193 호

AltStyle によって変換されたページ (->オリジナル) /