diff --git a/1848A Vika and Her Friends/1848A.cpp b/1848A Vika and Her Friends/1848A.cpp new file mode 100644 index 0000000..b58405b --- /dev/null +++ b/1848A Vika and Her Friends/1848A.cpp @@ -0,0 +1,36 @@ +#include +using namespace std; +using ll = long long; + + +void solve() +{ + int n,m,k; + cin>>n>>m>>k; + int x,y; + cin>>x>>y; + bool caught=false; + while(k--) + { + int p,q; + cin>>p>>q; + int d=abs(x-p)+abs(y-q); + if(d%2==0) + { + caught=true; + } + } + if(caught) cout<<"NO"<> TC; + cin.ignore(); + while (TC--) solve(); +} \ No newline at end of file