$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的更多相关文章

  1. NBUT 1220 SPY 2010辽宁省赛

    Time limit  1000 ms Memory limit  131072 kB The National Intelligence Council of X Nation receives a ...

  2. NBUT 1457 莫队算法 离散化

    Sona Time Limit:5000MS     Memory Limit:65535KB     64bit IO Format: Submit Status Practice NBUT 145 ...

  3. 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 ...

  4. ACM: NBUT 1107 盒子游戏 - 简单博弈

     NBUT 1107  盒子游戏 Time Limit:1000MS     Memory Limit:65535KB     64bit IO Format:  Practice  Appoint ...

  5. ACM: NBUT 1105 多连块拼图 - 水题 - 模拟

    NBUT 1105  多连块拼图 Time Limit:1000MS     Memory Limit:65535KB     64bit IO Format:  Practice  Appoint ...

  6. Manthan, Codefest 16 -C. Spy Syndrome 2

    time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standa ...

  7. 用PowerMock spy mock private方法

    在实际的工作中,经常碰到只需要mock一个类的一部分方法,这时候可以用spy来实现. 被测类: public class EmployeeService { public boolean exist( ...

  8. 1220 - Mysterious Bacteria--LightOj1220 (gcd)

    http://lightoj.com/volume_showproblem.php?problem=1220 题目大意: 给你一个x,求出满足 x=b^p, p最大是几. 分析:x=p1^a1*p2^ ...

  9. Jasmine测试ng Promises - Provide and Spy

    jasmine提供了很多些很实用的处理Promises的方法,首先我们来考虑下面的这个例子: angular.module("myApp.store").controller(&q ...

随机推荐

  1. 南阳ACM 题目71:独木舟上的旅行 Java版

    独木舟上的旅行 时间限制:3000 ms  |  内存限制:65535 KB 难度:2 描述 进行一次独木舟的旅行活动,独木舟可以在港口租到,并且之间没有区别.一条独木舟最多只能乘坐两个人,且乘客的总 ...

  2. Robot Framework 常用关键字使用方法

    1. Select From Listid=sourceConnoracle_source 从下拉框选取值. 2. Select Radio button  name value 选择单选框.也可以点 ...

  3. 【HDU】6148 Valley Numer 数位DP

    [算法]数位DP [题意]定义V-number为从左到看单位数字未出现先递增后递减现象的数字,求0~N中满足条件的数字个数.T<=200,lenth(n)<=100 [题解]百度之星201 ...

  4. 发福利喽稀疏FFT

    附介绍: 四位来自麻省理工学院的研究人员蒂娜·卡塔比(Dina Katabi).海塞姆·哈桑(Haitham Hassanieh).比欧特·因迪克(Piotr Indyk)和埃里克·普里斯(Eric ...

  5. Chinese Rings (九连环+矩阵快速幂)

    题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2842 题目: Problem Description Dumbear likes to play th ...

  6. c语言中的size_t

    size_t unsigned int 类型,无符号,它的取值没有负数.用来表示 参数/数组元素个数,sizeof 返回值,或 str相关函数返回的 size 或 长度.sizeof 操作符的结果类型 ...

  7. Python模块学习 - pyinotify

    pyinotify介绍 pyinotify模块用来监测文件系统的变化,依赖于Linux内核的inotify功能,inotify是一个事件驱动的通知器,其通知接口从内核空间到用户空间通过三个系统调用.p ...

  8. shellcheck 帮助你写出更好的脚本

    简介 shellcheck 是一款实用的 shell脚本静态检查工具. 首先,可以帮助你提前发现并修复简单的语法错误,节约时间.每次都需要运行才发现写错了一个小地方,确实非常浪费时间. 其次,可以针对 ...

  9. python基础===类的私有属性(伪私有)

    说在前面的一点: python明明有私有的定义方法就是在变量或者方法的面前加上双下滑线__,这个实际上是python的伪私有.只是一种程序员约定俗称的规定,加了就表示私有变量,但是你如果要在外部调用的 ...

  10. signal, sigaction,信号集合操作

    信号是与一定的进程相联系的,而建立其信号和进程的对应关系,这就是信号的安装登记. Linux主要有两个函数实现信号的安装登记:signal和sigaction.其中signal在系统调用的基础上实现, ...