| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 123391 | 唐诗阳 | 19老李吃水果 | C++ | Wrong Answer | 0 MS | 308 KB | 621 | 2025-06-29 15:38:10 |
#include<iostream> #include<cstdio> //scanf()\printf() #include<cstring> #include<cmath> //sqrt()\pow()\abs()\ceil()\floor()\max()\min() using namespace std; int main(){ int a[10001]={0},k,n,x,b=0; cin>>k; for(int i=1;i<=k;i++){ cin>>n; for(int j=1;j<=n;j++){ cin>>a[j]; } x=1; for(int j=2;j<=n;j++){ if(a[j]==a[x]){ cout<<'N'<<endl; b=1; break; } x++; } if(b!=1){ cout<<'Y'<<endl; } } return 0; }
------Input------
5 6 1 2 4 2 2 4 5 1 1 1 2 1 5 1 1 1 2 1 5 1 1 1 2 1 5 1 1 1 2 1
------Answer-----
Y N N N N
------Your output-----
N N N N N