Created
October 7, 2016 00:20
-
-
Save edwinab1/2d771fc81ecb145d15688f57f674f06e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <vector> | |
#include <stdio.h> | |
using namespace std; | |
int main() | |
{ | |
vector<int> cn1; | |
vector<int> cn2; | |
int n, tam=5; | |
int x; | |
while(cin>>n&&n!=EOF) | |
{ | |
cn1.push_back(n); | |
for(int i=1; i<tam; i++) | |
{ | |
cin>>n; | |
if(n==1||n==0) | |
cn1.push_back(n); | |
} | |
for(int i=0; i<tam; i++) | |
{ | |
cin>>n; | |
if(n==1||n==0) | |
cn2.push_back(n); | |
} | |
for(x=0; x<tam; x++) | |
{ | |
if(cn1[x]==cn2[x]) | |
{ | |
cout<<"N"<<endl; | |
break; | |
} | |
} | |
if(x==5) | |
cout<<"Y"<<endl; | |
cn1.clear(); | |
cn2.clear(); | |
} | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment