标签:
http://www.spoj.com/problems/OFFSIDE/
阅读题。。
#include<cstdio> #include<cstring> int x,a,b,c,n,m,i; int main(){ while(scanf("%d%d",&n,&m)&&(n+m)){ a=b=c=100000; for (i=1;i<=n;i++){ scanf("%d",&x); if (x<a)a=x; } for (i=1;i<=m;i++){ scanf("%d",&x); if (x<b){c=b;b=x;}else if (x<c)c=x; } if (c>a)printf("Y\n");else printf("N\n"); } }
标签:
原文地址:http://www.cnblogs.com/moris/p/4321777.html