Is Derek lying? HDU
来源:互联网 发布:linux把ip写入配置文件 编辑:程序博客网 时间:2024/06/05 08:44
said,you can consider he is not lying,otherwise he is lying.
For each test case,there will be three lines.
The first line consists of three integers
The second line consists of
The third line consists of
Data Range:
Please print “
23 1 3AAAABC5 5 0ABCBCACBCB
Not lyingLying
#include<cmath>#include<cstring>#include<cstdio>using namespace std;const int M=80010;char s1[M],s2[M];int t,n,a,b;int main(){ scanf("%d",&t); while(t--) { scanf("%d%d%d",&n,&a,&b); int c=0; scanf("%s",s1); scanf("%s",s2); for(int i=0;i<n;i++) if(s1[i]==s2[i]) c++; if(a+b<=n+c&&abs(a-b)<=n-c) printf("Not lying\n"); else printf("Lying\n"); } return 0;}
阅读全文
0 0
- Is Derek lying? HDU
- hdu 6054-Is Derek lying?
- HDU 6045 Is Derek lying?
- hdu 6045 Is Derek lying?
- HDU 6045 Is Derek lying?
- hdu--6045 Is Derek Lying
- hdu 6045 Is Derek lying?
- HDU 6045 Is Derek lying?【】
- HDU 6045 Is Derek lying?
- HDU-6045-Is Derek lying?
- hdu 6045 Is Derek lying?
- hdu 6045.Is Derek lying?
- HDU 6045多校Is Derek lying?
- Is Derek lying?(HDU 6045)
- (数学)HDU 6045 Is Derek lying?
- HDU 6045 Is Derek lying?(思维)
- HDU 6045 Is Derek lying? 水题
- hdu 多校联赛 Is Derek lying?
- java AWT菜单
- (UART 与 USART有什么区别)&(SPI、I2C、UART三种串行总线协议的区别)
- 初探SpringBoot
- 剑指offerT41另外一种解法
- 通过虚拟机搭建缓存集群
- Is Derek lying? HDU
- hdu-1024 多段子段最大和问题
- 第二章 进程管理
- Python: PS 滤镜-- 极坐标变换到平面坐标
- GitHub+node.js+hexo搭建个人博客教程
- Java之Lombok
- 习题7-13:数字表达式
- 1033. 旧键盘打字(20)
- 【c++】检测一个函数运行的时间