标签:
HDU - 5665Time Limit: 1000MS | Memory Limit: 65536KB | 64bit IO Format: %I64d & %I64u |
Description
Input
Output
Sample Input
1 1 2
Sample Output
NO
Source
#include<stdio.h> #include<string.h> #include<algorithm> #include<iostream> #define INF 0x3f3f3f3f #define ll long long #define N 1010 #define M 1000000007 using namespace std; int main() { int t; scanf("%d",&t); while(t--) { int n; scanf("%d",&n); bool f1=false,f2=false; for(int i=0;i<n;i++) { int a; scanf("%d",&a); if(a==1) f1=true; if(a==0) f2=true; } if(f1&&f2) printf("YES\n"); else printf("NO\n"); } return 0; }
标签:
原文地址:http://blog.csdn.net/yanghui07216/article/details/51200289