시간 제한 메모리 제한 제출 정답 맞은 사람 정답 비율
1 초 128 MB 1159 260 171 22.441%

문제

비밀 요원 007은 제임스 본드로 유명한 비밀 요원이다. 최근 알려진 정보에 의하면 제임스본드는 대다수 미션을 자신이 직접 수행하지 않는다고 한다. 본드는 미션을 자신과 비슷하게 생긴 사촌들인 지미 본드에게 시킨다. 제임스 본드는 MI6로부터 미션을 받으면, 각 미션을 사촌들에게 하나씩 할당해 준다.

매달 초에 제임스 본드는 미션 목록을 받게 된다. 그 다음에 그는 각각의 지미 본드에 대해서 미션을 성공적으로 수행할 확률을 구한다. 이제, 전체 미션을 성공할 확률이 가장 크게 되게 미션을 지미 본드에게 나누어 주려고 한다. 어떤 미션을 어떤 지미 본드에게 나누어 주어야 할 지를 결정한 다음, 전체 미션을 성공할 확률을 구하는 프로그램을 작성하시오.

모든 미션을 성공적으로 끝낼 확률은 각 미션을 성공적으로 끝낼 확률을 모두 곱하면 된다.

입력

첫째 줄에 미션과 지미 본드의 수인 N이 주어진다. (1 ≤ N ≤ 20)

다음 N개 줄에는 0과 100 사이의 정수가 N개씩 주어진다. i번째 줄의 j번째 정수는 지미 본드 i가 미션 j를 성공적으로 마칠 확률이며, 퍼센트로 주어진다. 

출력

첫째 줄에 모든 미션을 성공적으로 마칠 확률을 퍼센트로 출력한다. 정답과의 오차는 ±0.000001까지 허용한다.

예제 입력 1

3
25 60 100
13 0 50
12 70 90

예제 출력 1

9.10000
W3sicHJvYmxlbV9pZCI6IjMwNTYiLCJwcm9ibGVtX2xhbmciOiIwIiwidGl0bGUiOiIwMDciLCJkZXNjcmlwdGlvbiI6IjxwPlx1YmU0NFx1YmMwMCBcdWM2OTRcdWM2ZDAgMDA3XHVjNzQwIFx1YzgxY1x1Yzc4NFx1YzJhNCBcdWJjZjhcdWI0ZGNcdWI4NWMgXHVjNzIwXHViYTg1XHVkNTVjIFx1YmU0NFx1YmMwMCBcdWM2OTRcdWM2ZDBcdWM3NzRcdWIyZTQuIFx1Y2Q1Y1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XNzaW9ucyAoMSAmbGU7IE4gJmxlOyAyMCkuJm5ic3A7PFwvcD5cclxuXHJcbjxwPlRoZSBmb2xsb3dpbmcgTiBsaW5lcyB3aWxsIGNvbnRhaW4gTiBpbnRlZ2VycyBiZXR3ZWVuIDAgYW5kIDEwMCwgaW5jbHVzaXZlLiBUaGUgai10aCBpbnRlZ2VyIG9uIHRoZSBpdGggbGluZSBpcyB0aGUgcHJvYmFiaWxpdHkgdGhhdCBKaW1teSBCb25kIGkgd291bGQgc3VjY2Vzc2Z1bGx5IGNvbXBsZXRlIG1pc3Npb24gaiwgZ2l2ZW4gYXMgYSBwZXJjZW50YWdlLjxcL3A+XHJcbiIsIm91dHB1dCI6IjxwPk91dHB1dCB0aGUgbWF4aW11bSBwcm9iYWJpbGl0eSBvZiBKaW1teSBCb25kcyBzdWNjZXNzZnVsbHkgY29tcGxldGluZyBhbGwgdGhlIG1pc3Npb25zLCBhcyBhIHBlcmNlbnRhZ2UuJm5ic3A7PFwvcD5cclxuXHJcbjxwPk5vdGU6IE91dHB1dHMgd2l0aGluICZwbHVzbW47MC4wMDAwMDEgb2YgdGhlIG9mZmljaWFsIHNvbHV0aW9uIHdpbGwgYmUgYWNjZXB0ZWQuJm5ic3A7PFwvcD5cclxuIiwiaGludCI6IiIsIm9yaWdpbmFsIjoiMSIsInByb2JsZW1fbGFuZ19jb2RlIjoiXHVjNjAxXHVjNWI0In1d

출처

Contest > Croatian Open Competition in Informatics > COCI 2006/2007 > Contest #1 5번

  • 문제를 번역한 사람: baekjoon
  • 문제의 오타를 찾은 사람: jh05013