NBUT 1220 SPY
$map$,简单模拟。
#include<cstdio>
#include<cstring>
#include<cmath>
#include<algorithm>
#include<vector>
#include<map>
#include<string>
#include<iostream>
using namespace std; int n,m,k;
string er[]; int main()
{
while(~scanf("%d%d%d",&n,&m,&k))
{
map<string,bool>f1;
for(int i=;i<=n;i++)
{
string s; cin>>s;
f1[s]=;
}
for(int i=;i<=m;i++) cin>>er[i]; map<string,bool>f2; vector<string>ans; for(int i=;i<=k;i++)
{
string s; cin>>s;
f2[s]=;
} for(int i=;i<=m;i++)
{
if(f2[er[i]]) continue;
if(f1[er[i]]) ans.push_back(er[i]);
} if(ans.size()==) printf("No enemy spy\n");
else
{
for(int i=;i<ans.size();i++)
{
cout<<ans[i];
if(i<ans.size()-) printf(" ");
else printf("\n");
}
} }
return ;
}
NBUT 1220 SPY的更多相关文章
- NBUT 1220 SPY 2010辽宁省赛
Time limit 1000 ms Memory limit 131072 kB The National Intelligence Council of X Nation receives a ...
- NBUT 1457 莫队算法 离散化
Sona Time Limit:5000MS Memory Limit:65535KB 64bit IO Format: Submit Status Practice NBUT 145 ...
- UVA - 1025 A Spy in the Metro[DP DAG]
UVA - 1025 A Spy in the Metro Secret agent Maria was sent to Algorithms City to carry out an especia ...
- ACM: NBUT 1107 盒子游戏 - 简单博弈
NBUT 1107 盒子游戏 Time Limit:1000MS Memory Limit:65535KB 64bit IO Format: Practice Appoint ...
- ACM: NBUT 1105 多连块拼图 - 水题 - 模拟
NBUT 1105 多连块拼图 Time Limit:1000MS Memory Limit:65535KB 64bit IO Format: Practice Appoint ...
- Manthan, Codefest 16 -C. Spy Syndrome 2
time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standa ...
- 用PowerMock spy mock private方法
在实际的工作中,经常碰到只需要mock一个类的一部分方法,这时候可以用spy来实现. 被测类: public class EmployeeService { public boolean exist( ...
- 1220 - Mysterious Bacteria--LightOj1220 (gcd)
http://lightoj.com/volume_showproblem.php?problem=1220 题目大意: 给你一个x,求出满足 x=b^p, p最大是几. 分析:x=p1^a1*p2^ ...
- Jasmine测试ng Promises - Provide and Spy
jasmine提供了很多些很实用的处理Promises的方法,首先我们来考虑下面的这个例子: angular.module("myApp.store").controller(&q ...
随机推荐
- Leetcode:52. N-QueensII
Description Follow up for N-Queens problem. Now, instead outputting board configurations, return the ...
- Java中xml2json,json2xml
在JAVA中xml与json数据互相转换 package com.sgcc.platform.common.utils; import static java.lang.String.format; ...
- MyBatis框架的使用及源码分析(三) 配置篇 Configuration
从上文<MyBatis框架中Mapper映射配置的使用及原理解析(二) 配置篇 SqlSessionFactoryBuilder,XMLConfigBuilder> 我们知道XMLConf ...
- 诱惑当前 你的孩子能hold住吗?
1.打好态度.动机.价值观基础 培养未成熟主体远大的志向,并不是向他们讲一些抽象的道理,而是根据他们的年龄特点,从形象的故事.童话开始,从身边的人物.事例出发,逐渐渗透一些人生的哲理.有一位自觉性非常 ...
- No cached version of ..... available for offline mode.
I had same error...Please Uncheck the offline work in Settings. File => Settings => Build, Exe ...
- TOYS(计算几何基础+点与直线的位置关系)
题目链接:http://poj.org/problem?id=2318 题面: TOYS Time Limit: 2000MS Memory Limit: 65536K Total Submiss ...
- HDU 1422 重温世界杯 (dp)
题目链接 Problem Description 世界杯结束了,意大利人连本带利的收回了法国人6年前欠他们的债,捧起了大力神杯,成就了4星意大利. 世界杯虽然结束了,但是这界世界杯给我们还是留下许多值 ...
- 8.0docker的客户端和守护进程
C/S 链接的方式 unix:///var/run/docker.sock 默认的 tcp://host:port fd://socketfd 在linux上进行socket 模拟 nc -U /va ...
- 新建一个express工程,node app无反应
1.问题描述 新建一个express工程,node app以后无反应,浏览器输入localhost:3000,显示如下 2.解决方法 在app.js文件中加入如下代码 app.listen(3000, ...
- python中BeautifulSoup模块
BeautifulSoup模块是干嘛的? 答:通过html标签去快速匹配标签中的内容.效率相对比正则会好的多.效率跟xpath模块应该差不多. 一:解析器: BeautifulSoup(html,&q ...