Skip to content

Instantly share code, notes, and snippets.

@edwinab1
Created October 7, 2016 00:20
Show Gist options
  • Save edwinab1/2d771fc81ecb145d15688f57f674f06e to your computer and use it in GitHub Desktop.
Save edwinab1/2d771fc81ecb145d15688f57f674f06e to your computer and use it in GitHub Desktop.
#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