Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdbool.h>
- #define NMAX 22
- int n, m, k, a[NMAX][NMAX];
- int main() {
- scanf("%i %i %i", &m, &n, &k);
- for (int i = 1; i <= m; i++) {
- for (int j = 1; j <= n; j++) {
- scanf("%i", &a[i][j]);
- }
- }
- for (int i = 1; i <= m; i++) {
- if (i != k) {
- bool ok = true;
- for (int j = 1; j <= n; j++) {
- ok &= a[i][j] != a[k][j];
- }
- if (ok) {
- puts("DA");
- return 0;
- }
- }
- }
- puts("NU");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement