HomeVolumesContestsSectionsForumsUsersPrintHelpAbout

Sections > Unsorted > problem:


50251 - Symmetric matrix

Guest
• Discussion of problem (1)

Section problems

• 50610 - Feasibility
• 50612 - Fun game
• 50617 - KBH
• 50618 - Code Correction
• 50620 - Poker
• 50621 - Postal Figures
• 50630 - Radio Station
• 50631 - Robots
• 50251 - Symmetric matrix
• 50244 - Chessboard Pattern
• 50428 - Three Times
• 50879 - Passed or Failed
• 50387 - Passengers in the Train
• 50438 - Pattern with stars
• 50426 - Calculating Sales
• 50425 - Calculating Weekly Pay
• 50456 - nth Digit of a Number

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