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