結果

問題 No.3286 Make a Happy Connection
ユーザー sss
提出日時 2025-10-23 11:18:38
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
RE  
実行時間 -
コード長 378 bytes
コンパイル時間 1,984 ms
コンパイル使用メモリ 196,144 KB
実行使用メモリ 7,724 KB
最終ジャッジ日時 2025-10-23 11:18:44
合計ジャッジ時間 6,104 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample WA * 1 RE * 2
other WA * 1 RE * 26
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
 
int main(){
	
	int N;
	cin >> N ;
	
	 vector<int> A(N);
	
	for(int i = 0 ; i < N ;i++){
		
		int a;
		cin >> a;
		
		A.at(i)= a;
	}
	
		
	for(int i = 0; i < N-1 ; i++){
		
		if( A.at(i) == A.at(i+1) || A.at(i) == A.at(i+2) || A.at(N-1) == A.at(N)){
			
			cout << "Yes" << endl;
			
		}else{
				cout << "No" << endl;
			}
		
	}
}
0