http://acm.hdu.edu.cn/showproblem.php?pid=5904://

说是LCIS其实和LCIS没有一点儿关系的水题。
代码
 #include<cstdio>
#include<cstring>
#include<iostream>
#include<algorithm>
#include<cmath>
using namespace std;
const int maxn=;
const double eps=1e-;
const int modn=;
int n,m;
int f1[*maxn]={};
int f2[*maxn]={};
int main(){
int T;scanf("%d",&T);
while(T-->){
scanf("%d%d",&n,&m);
memset(f1,,sizeof(f1));
memset(f2,,sizeof(f2));
int x,ma=,ans=,z;
for(int i=;i<=n;i++){
scanf("%d",&x);
f1[x]=f1[x-]+;
ma=max(x,ma);
}
for(int i=;i<=m;i++){
scanf("%d",&x);
f2[x]=f2[x-]+;
ma=max(x,ma);
}
for(int i=;i<=ma;i++){
z=min(f1[i],f2[i]);
ans=max(ans,z);
}
printf("%d\n",ans);
}
return ;
}

最新文章

  1. 使用gulp-uncss清理多余无用css
  2. maven + eclipse + tomcat热部署
  3. 【读书笔记】iOS网络-使用Bonjour实现自组织网络
  4. MX4连接后adb无法识别解决方法
  5. 【Amazon Linux】免费搭建subversion服务器
  6. Swift 玩转gif
  7. HTTP调试 抓包 工具 Fiddle 简介 示例
  8. mycat(4)
  9. kibana 版本kibana-4.3.1 修改地图
  10. MVC5
  11. 时间转换(字符串转date 年月日时分秒 格式)
  12. 团队作业4——第一次项目冲刺 tHiRd DaY
  13. MyBatis 查询映射自定义枚举
  14. 第一天 Java语言概述
  15. Sublime text3 连接sftp/ftp(远程服务器)
  16. Java模拟耗时任务异步执行
  17. Linux学习笔记:【000】Linux系统入门
  18. PCL点云分割(3)
  19. PHP 类文件的自动加载机制 __autoload()
  20. 继承方法--&gt;原型的相互引用

热门文章

  1. 【CodeForces】626 F. Group Projects 动态规划
  2. VScode格式化ESlint
  3. tf.name_scope tf.variable_scope学习
  4. S3C6410 SPI全双工读写流程分析(原创)【转】
  5. TCP 建立的3次握手, 和关闭的4次握手
  6. 26_Python的内置函数
  7. vue单选,多选,多选的内容显示在页面可删除
  8. 用js实现登录的简单验证
  9. sshd_config OpenSSH SSH 进程配置文件配置说明
  10. mac os版本Intellij IDEA 搭建spring mvc的maven工程(新手教学)