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

34644번 - Ten Player Bingo 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 2048 MB19711910159.064%

문제

Bingo is a game of chance for multiple players. Each player receives a sheet with some numbers, and a game master then calls out these numbers in a random order. Players cross off the numbers that they have heard, and the first player to cross off all their numbers wins the game. This basic version of the game has a reputation for being, well, a bit sedate. No particular action is required of the players except for not falling asleep.

In this problem we will analyze a specific version of Bingo that requires exactly ten players. In our version, called Ten Player Bingo, each player is numbered from 1ドル$ to 10ドル$. Each player also receives a sheet that contains the integers from 1ドル$ to 100ドル$ that share the same units digit as the units digit of the player’s number. The game master has also been given a sheet that contains every integer from 1ドル$ to 100ドル$ exactly once, but the integers have been shuffled. The game master will read the integers in the order presented on the sheet. When a player has heard all of their integers, they shout “BINGO” and leave the game. The game continues until everyone has shouted “BINGO”.

Who is the last player to shout “BINGO”?

입력

The first and only line of input contains 100ドル$ integers, each ranging from 1ドル$ to 100ドル$. It is guaranteed each integer appears exactly once.

출력

Output a single integer, which is the number of the player who shouts “BINGO” last.

제한

예제 입력 1

12 91 49 4 52 95 45 51 50 40 11 5 88 87 39 38 42 89 76 85 30 69 35 81 23 67 32 3 62 8 79 58 1 75 37 27 24 46 18 16 97 61 41 59 13 74 78 54 98 66 14 33 86 55 83 93 63 72 6 19 92 17 56 64 100 53 28 71 7 96 36 57 84 43 73 60 15 77 80 31 20 99 21 90 70 22 26 10 25 2 94 9 82 34 65 68 48 29 44 47

예제 출력 1

7

노트

출처

ICPC > Regionals > North America > North America Qualification Contest > ICPC North America Qualifier 2025 J번

University > MIT > The MIT Programming Contest > 2025-26 > MIT Team Contest 1 J번

  • 문제를 만든 사람: Nick Wu
(追記) (追記ここまで)

출처

대학교 대회

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

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