mirror of
https://github.com/Kiritow/OJ-Problems-Source.git
synced 2024-03-22 13:11:29 +08:00
23 lines
448 B
C++
23 lines
448 B
C++
|
#include<stdio.h>
|
||
|
#include<string.h>
|
||
|
int main()
|
||
|
{
|
||
|
int t,l,n,a[21][21],i,j,k,o;
|
||
|
scanf("%d",&t);
|
||
|
while(t--)
|
||
|
{
|
||
|
memset(a,0,sizeof(int)*21*21);
|
||
|
k=0;
|
||
|
scanf("%d%d",&l,&n);
|
||
|
o=n;
|
||
|
while(o--)
|
||
|
{
|
||
|
scanf("%d%d",&i,&j);
|
||
|
if(a[i][j]==0) a[i][j]=1;
|
||
|
else k++;
|
||
|
}
|
||
|
if((n-k)%4==0)printf("YES\n");
|
||
|
else printf("NO\n");
|
||
|
}
|
||
|
}
|