HomeVolumesContestsSectionsForumsUsersPrintHelpAbout

Volumes > Problems from Olympiads.ru > problem:


147. 50251 - Symmetric matrix

Guest
• Discussion of problem (1)

Volume problems

• 105. 50243 - Sum of digits
• 107a. 50240 - The numbers that are...
• 107b. 50242 - Numbers whose sum...
• 113. 50241 - Greatest common divisor
• 127b. 50730 - The largest product
• 127c. 50731 - The largest product (2)
• 133. 50239 - Eating cheese
• 138. 50732 - Sorting
• 147. 50251 - Symmetric matrix
• 159. 50668 - Triangle
• 206. 50252 - Birthday
• 213. 50769 - Arithmetic expression
• 217. 50253 - Timer
• 234. 50249 - Ladders
• 235. 50250 - The Knight
• 240. 50247 - Missing numbers
• 272. 50707 - Rebus

Feedback

If you notice incorrect translations in Contester, please let author know.

Time limit 2000/4000/4000/4000 ms. Memory limit 65000/65000/65000/65000 Kb. Difficulty Alpha

Given a square matrix. Check whether it is symmetrical about the main diagonal.

Input
The first line contains the number n (0 < n ≤ 100). The following n lines contain n integers, not exceeding modulo 100,000.
Output
Say "YES", if the matrix is symmetric about the main diagonal, otherwise withdraw "NO".

Input
3
1 2 3
2 4 5
3 5 6
Output
YES

Для отправки решений необходимо выполнить вход.

www.contester.ru