Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please write in C Language Description After midterm, kind teacher C.C. in class Rou decide to holds a bingo game in class Rou. The game

Please write in C Language

Description

After midterm, kind teacher C.C. in class Rou decide to holds a bingo game in class Rou. The game rules are as followed:

1. Every student should prepare an 5 by 5 girds on bingo card.

2. Filling bingo card with number from 1 to 25. Each number should exists exactly once.

3. Handing the filled bingo card to teacher.

4. According to teacher CC's mood, she will came out an order of the numbers from 1 to 25.

5. For each bingo card, teacher will mark the number as the order in step 4. until all number in some line are marked.

6. Each marked number will consider one additional point for the student.

There are 12 lines in bingo card, 5 vertical lines, 5 horizontal line, and 2 diagonal lines. Please write a program to help teacher C.C. to judge bingo cards.

Input

First line of input is an integer nn, shows the number of student, numbering through 1 to n.

Followed 5n5n lines are bingo card. Every 5 lines are one card.

Last line with 25 integers is the sequence which shows the ordering that teacher C.C. mark numbers on bingo cards.

  • 1 \le n \le 301n30
  • All the numbers on cards will filled to 2 digits with leader 0.
  • Each numbers of {1, 2, ..., 25} should appear exactly once.

Output

For convenient, please group students with the same total additional points in form "score: id id id" (exclude quarts).

Each id behind an white space. Please order the total additional points and student IDs in increasing order.

Sample Input 1

3 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 01 06 11 16 21 02 07 12 17 22 03 08 13 18 23 04 09 14 19 24 05 10 15 20 25 15 20 19 10 17 01 12 18 23 04 06 08 25 22 16 24 21 07 11 02 14 05 09 03 13 11 14 15 05 08 10 18 22 07 20 21 19 02 25 12 03 13 09 17 24 16 04 01 23 06

Sample Output 1

14: 1 2 15: 3

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Machine Learning And Knowledge Discovery In Databases European Conference Ecml Pkdd 2018 Dublin Ireland September 10 14 2018 Proceedings Part 1 Lnai 11051

Authors: Michele Berlingerio ,Francesco Bonchi ,Thomas Gartner ,Neil Hurley ,Georgiana Ifrim

1st Edition

3030109240, 978-3030109240

More Books

Students also viewed these Databases questions

Question

Complexity of linear search is O ( n ) . Your answer: True False

Answered: 1 week ago

Question

6. Discuss the steps involved in conducting a task analysis.

Answered: 1 week ago

Question

8. Explain competency models and the process used to develop them.

Answered: 1 week ago