結果

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

ソースコード

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-2 ; i++){
		
		int b = 0;
		
		if( A.at(i) == A.at(i+1) || A.at(i) == A.at(i+2) || A.at(N-2) == A.at(N-1)){
			
			b = 1;
			
		}
		
		if(b == 1){
			
			cout << "Yes" << endl;
			
		}else{
			
			cout << "No" << endl;
			
		}
		
	}
}
0