다음 알고리즘 문제를 한국어로 번역해주세요. You're watching a show where Googlers (employees of Google)…
- User
다음 알고리즘 문제를 한국어로 번역해주세요.
You're watching a show where Googlers (employees of Google) dance, and then each dancer is given a triplet of scores by three judges. Each triplet of scores consists of three integer scores from 0 to 10 inclusive. The judges have very similar standards, so it's surprising if a triplet of scores contains two scores that are 2 apart. No triplet of scores contains scores that are more than 2 apart.
For example: (8, 8, 8) and (7, 8, 7) are not surprising. (6, 7, 8) and (6, 8, 8) are surprising. (7, 6, 9) will never happen.
The total points for a Googler is the sum of the three scores in that Googler's triplet of scores. The best result for a Googler is the maximum of the three scores in that Googler's triplet of scores. Given the total points for each Googler, as well as the number of surprising triplets of scores, what is the maximum number of Googlers that could have had a best result of at least p?
For example, suppose there were 6 Googlers, and they had the following total points: 29, 20, 8, 18, 18, 21. You remember that there were 2 surprising triplets of scores, and you want to know how many Googlers could have gotten a best result of 8 or better.
With those total points, and knowing that two of the triplets were surprising, the triplets of scores could have been:
10 9 10 6 6 8 () 2 3 3 6 6 6 6 6 6 6 7 8 ()
The cases marked with a (*) are the surprising cases. This gives us 3 Googlers who got at least one score of 8 or better. There's no series of triplets of scores that would give us a higher number than 3, so the answer is 3.
- Assistant
당신은 구글러(구글 직원)들이 춤을 추는 쇼를 보고 있습니다. 각 춤추는 구글러는 세 명의 심사위원으로부터 세 개의 점수 삼중조를 받습니다. 이 점수 삼중조는 각기 0부터 10까지의 정수로 이루어져 있습니다. 심사위원들은 매우 유사한 기준을 가지고 있어서, 점수 삼중조 안에 두 점수가 2 차이가 나는 경우는 놀랍습니다. 어떤 삼중조도 2보다 큰 차이를 가지는 점수를 포함하지 않습니다.
예를 들어: (8, 8, 8)과 (7, 8, 7)은 놀랍지 않습니다. (6, 7, 8)과 (6, 8, 8)은 놀랍습니다. (7, 6, 9)는 절대 일어나지 않습니다.
구글러의 총 점수는 그 구글러의 삼중조의 점수들의 합입니다. 구글러의 최고 점수는 그 구글러의 삼중조의 세 점수 중 최대값입니다. 각 구글러의 총 점수와 놀라운 삼중조의 수가 주어졌을 때, 최고 점수가 적어도 p인 구글러의 최대 수는 몇 명입니까?
예를 들어, 6명의 구글러가 있고, 이들이 다음과 같은 총 점수를 가졌다고 합시다: 29, 20, 8, 18, 18, 21. 놀라운 삼중조가 2개 있었고, 최고 점수가 8 이상인 구글러가 몇 명인지 알고 싶습니다.
이 총 점수들과 두 개의 놀라운 삼중조가 있다는 것을 알고 있을 때, 삼중조의 점수는 다음과 같을 수 있습니다:
10 9 10 6 6 8 () 2 3 3 6 6 6 6 6 6 6 7 8 ()
(*)로 표시된 경우들이 놀라운 경우입니다. 이는 3명의 구글러가 적어도 하나의 8 이상의 점수를 받았음을 의미합니다. 이보다 더 많은 수의 구글러가 8 이상의 점수를 받을 수 있는 방법은 없으므로, 정답은 3입니다.