40分,就过了前四个点
查看原帖
40分,就过了前四个点
749272
ysqfirmament楼主2022/10/30 21:16
#include <bits/stdc++.h>
using namespace std;
int main()
{
    int T,n,k,no=0;
    cin>>T;
    for(int i=1;i<=T;i++)
    {
        cin>>n;
        for(int j=1;j<=n;j++)
        {
            cin>>k;
            if(k==0)
            {
                no=0;
            }else{
                no++;
            }
        }
        if(no==n)
        {
            cout<<"no"<<endl;
        }else{
            cout<<"yes"<<endl;
        }
    }
}
2022/10/30 21:16
加载中...