cf find the bone
来源:互联网 发布:echarts源码 编辑:程序博客网 时间:2024/06/15 06:59
#include <iostream>
#include<cstdio>
#include<cstring>
using namespace std;
int a[100005];
int main()
{
int n,m,k;
while(cin>>n>>m>>k)
{
memset(a,0,sizeof(a));
for(int i=0;i<m;i++)
{
int tmp;
scanf("%d",&tmp);
a[tmp]++;
}
int flag=0;
int x,y;
while(k--)
{
scanf("%d%d",&x,&y);
if(a[y]==1&&flag==0)flag=y;
}
if(flag==0)flag=y;
cout<<flag<<endl;
}
return 0;
}
#include<cstdio>
#include<cstring>
using namespace std;
int a[100005];
int main()
{
int n,m,k;
while(cin>>n>>m>>k)
{
memset(a,0,sizeof(a));
for(int i=0;i<m;i++)
{
int tmp;
scanf("%d",&tmp);
a[tmp]++;
}
int flag=0;
int x,y;
while(k--)
{
scanf("%d%d",&x,&y);
if(a[y]==1&&flag==0)flag=y;
}
if(flag==0)flag=y;
cout<<flag<<endl;
}
return 0;
}
阅读全文
0 0
- cf find the bone
- B. Find The Bone
- CF Find the problem
- 796B Find The Bone
- CodeForces 796B Find The Bone
- 【CodeForces 796B】Find The Bone
- 0519 G2n#W2B-C Find The Bone
- 【Codeforces 796 B. Find The Bone】
- Codeforces Round #408 B. Find The Bone
- Find The Bone (Codeforces-796B)
- codeforces round#408(div.2) B. Find The Bone
- Codeforces Round #408 (Div. 2)-B. Find The Bone
- Codeforces Round #408 (Div. 2) B. Find The Bone
- Codeforces Round #408 (Div. 2) B.Find The Bone(模拟)
- Codeforces Round #408 (Div. 2) B. Find The Bone【模拟】水题~
- Tempter of the Bone
- Tempter of the Bone
- Tempter of the Bone
- iOS模拟器键盘弹出以及中文输入
- Android内存泄漏
- 禁用IE缓存
- eclipse总卡在Loading descriptor for xxx
- 最低公共祖先LCA
- cf find the bone
- 设计模式之门面(外观)模式
- ios开发工具souretree工具
- 第一篇试试吧
- 最全“勒索病毒”的应对方案
- React Native Realm数据库存储
- 阿里巴巴Java开发手册- 编程规约-命名规约
- 设计模式六大原则
- datepicker的具体用法