标签:
Time Limit: 5000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 538 Accepted Submission(s):
333
#include<stdio.h> #include<string.h> #include<iostream> #include<algorithm> using namespace std; int t1[10000],t2[10000]; int main(){ int a,b; while(scanf("%d%d",&a,&b)!=EOF){ if(a==0&&b==0) break; memset(t1,0,sizeof(t1)); memset(t2,0,sizeof(t2)); for(int i=0;i<a;i++) scanf("%d",&t1[i]); for(int i=0;i<b;i++) scanf("%d",&t2[i]); sort(t1,t1+a); sort(t2,t2+b); if(t1[0]<t2[1]) printf("Y\n"); else printf("N\n"); } return 0; }
标签:
原文地址:http://www.cnblogs.com/13224ACMer/p/4677454.html