Submission #46559267
Source Code Expand
#include<bits/stdc++.h>
using namespace std;
//#define int long long
inline int read(){int x=0,f=1;char ch=getchar();
while(ch<'0'||ch>'9'){if(ch=='-')f=-1;
ch=getchar();}while(ch>='0'&&ch<='9'){x=(x<<1)+
(x<<3)+(ch^48);ch=getchar();}return x*f;}
#define Z(x) (x)*(x)
#define pb push_back
//#define M
//#define mo
//#define N
int n, m, i, j, k, T;
signed main()
{
// freopen("in.txt", "r", stdin);
// freopen("out.txt", "w", stdout);
// srand(time(NULL));
// T=read();
// while(T--) {
//
// }
n=read();
j=read();
for(i=2; i<=n; ++i) {
k=read(); if(k!=j) break;
}
printf(i<=n ? "No" : "Yes");
return 0;
}
Submission Info
| Submission Time | |
|---|---|
| Task | A - Same |
| User | zhangtingxi |
| Language | C++ 20 (gcc 12.2) |
| Score | 100 |
| Code Size | 648 Byte |
| Status | AC |
| Exec Time | 1 ms |
| Memory | 3728 KiB |
Judge Result
| Set Name | Sample | All | ||||
|---|---|---|---|---|---|---|
| Score / Max Score | 0 / 0 | 100 / 100 | ||||
| Status |
|
|
| Set Name | Test Cases |
|---|---|
| Sample | 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt |
| All | 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt, 01_random_03.txt, 01_random_04.txt, 01_random_05.txt, 01_random_06.txt, 01_random_07.txt, 01_random_08.txt, 01_random_09.txt, 01_random_10.txt, 01_random_11.txt, 01_random_12.txt, 01_random_13.txt, 01_random_14.txt, 01_random_15.txt |
| Case Name | Status | Exec Time | Memory |
|---|---|---|---|
| 00_sample_00.txt | AC | 1 ms | 3596 KiB |
| 00_sample_01.txt | AC | 1 ms | 3724 KiB |
| 00_sample_02.txt | AC | 1 ms | 3584 KiB |
| 01_random_03.txt | AC | 1 ms | 3512 KiB |
| 01_random_04.txt | AC | 1 ms | 3540 KiB |
| 01_random_05.txt | AC | 1 ms | 3648 KiB |
| 01_random_06.txt | AC | 1 ms | 3728 KiB |
| 01_random_07.txt | AC | 1 ms | 3524 KiB |
| 01_random_08.txt | AC | 1 ms | 3628 KiB |
| 01_random_09.txt | AC | 1 ms | 3536 KiB |
| 01_random_10.txt | AC | 1 ms | 3576 KiB |
| 01_random_11.txt | AC | 1 ms | 3572 KiB |
| 01_random_12.txt | AC | 1 ms | 3728 KiB |
| 01_random_13.txt | AC | 1 ms | 3644 KiB |
| 01_random_14.txt | AC | 1 ms | 3528 KiB |
| 01_random_15.txt | AC | 1 ms | 3536 KiB |