Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- int niza[7];
- int matrica[5][6];
- for (int i = 0; i < 7; i++)
- {
- cin >> niza[i];
- }
- for (int i = 0; i < 5; i++)
- {
- for (int j = 0; j < 6; j++)
- {
- cin >> matrica[i][j];
- }
- }
- int kolku_pati[31];
- for (int i = 0; i < 31; i++)
- {
- kolku_pati[i] = 0;
- }
- for (int i = 0; i < 5; i++)
- {
- for (int j = 0; j < 6; j++)
- {
- kolku_pati[matrica[i][j]] += 1;
- }
- }
- int da = 1;
- for (int i = 0; i < 7; i++)
- {
- if (kolku_pati[niza[i]] > 0)
- {
- kolku_pati[niza[i]] -= 1;
- }
- else {da = -1;}
- }
- if (da == 1)
- {
- cout << "DA" << endl;
- }
- else {cout << "NE" << endl;}
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement