提出 #46559267


ソースコード 拡げる

#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;
}

提出情報

提出日時
問題 A - Same
ユーザ zhangtingxi
言語 C++ 20 (gcc 12.2)
得点 100
コード長 648 Byte
結果 AC
実行時間 1 ms
メモリ 3728 KiB

ジャッジ結果

セット名 Sample All
得点 / 配点 0 / 0 100 / 100
結果
AC × 3
AC × 16
セット名 テストケース
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
ケース名 結果 実行時間 メモリ
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