C. 练62.3 学习效率

    Type: Default 1000ms 256MiB

练62.3 学习效率

You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.

Description

A class has n2n^2 students, arranged in nn rows with nn students in each row. Each student has a diligence value ai,ja_{i,j}. We need to calculate each student's learning efficiency, which is defined as their own diligence value plus the diligence values of up to 88 surrounding students, i.e., the sum of diligence values in the 3×33 \times 3 square centered on each student. Please calculate the learning efficiency for each student.

Input Format

First line contains an integer nn (1n101 \le n \le 10), representing the size of the class.
Next nn lines, each containing nn integers ai,ja_{i,j} (1ai,j1001 \le a_{i,j} \le 100), representing the diligence value of each student.

Output Format

Output nn lines, each containing nn integers, representing the learning efficiency of each student.

Sample

2
1 2
3 4
10 10
10 10

20251108C班作业(6)

Not Claimed
Status
Done
Problem
4
Open Since
2025-11-8 0:00
Deadline
2025-11-16 23:59
Extension
24 hour(s)