My issue
i am error in runing this code
My code
#include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin>>n;
int x,y;
bool found=false;
int a,b;
for (int i=0;i<n;i++){
cin>>x>>y;
if ((x==a||y==b)&&(x==b||y==a)){
found=true;
}
}
cin>>a>>b;
if(found){
cout<<"yes"<<endl;
}
else{
cout<<"no"<<endl;
}
}
Learning course: Data structures & Algorithms lab
Problem Link: https://www.codechef.com/learn/course/muj-aiml-dsa-c/MUJADSAC10/problems/SESO05