这个题是个水题,看好多人过了,结果错了九次才过,觉得一个判断条件特别有道理,写了之后交了错了,
又发现一个条件也很有道理,换了这个条件交,也Wa了,最后索性两个条件一块使用,过了。
#include<iostream>
#include<stdio.h>
#include<string>
#include<cmath>
using namespace std;
const int N=80009;
int n,num,score1,score2;
char ch1[N];
char ch2[N];
int main()
{
int t;
scanf("%d",&t);
while(t--)
{
num=0;
scanf("%d%d%d",&n,&score1,&score2);
scanf("%s",ch1);
scanf("%s",ch2);
int flag=0;
for(int i=0; i<n; i++)
{
if(ch1[i]==ch2[i])
num++;
}
int Min=min(score1,score2);
Min=min(num,Min);
if((abs(score1-score2)<=n-num)&&(score1+score2-2*Min<=n-num))
printf("Not lying\n");
else
printf("Lying\n");
}
return 0;
}