Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <fstream>
- using namespace std;
- ifstream fin("matrice.in");
- int n, a[51][51];
- void read() {
- cin >> n;
- for (int i = 0; i < n; i++) {
- for (int j = 0; j < n; j++) {
- cin >> a[i][j];
- }
- }
- }
- int main() {
- read();
- int ok = 1;
- for (int i = 0; i < n - 1; i++) {
- for (int j = i + 1; j < n; j++) {
- if (a[i][j] != a[j][i]) {
- ok = 0;
- }
- }
- }
- cout << (ok ? "DA" : "NU") << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement