結果

問題 No.360 増加門松列
ユーザー mako55go
提出日時 2016-04-17 23:56:59
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 412 bytes
コンパイル時間 477 ms
コンパイル使用メモリ 61,740 KB
実行使用メモリ 6,824 KB
最終ジャッジ日時 2024-10-04 11:08:47
合計ジャッジ時間 1,429 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 9 WA * 13
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <stdio.h>
#include <iostream>
#include <algorithm>
#include<string>
#include <math.h>

using namespace std;




int main() {
	int a[7];
	int count = 0,p=0;
	cin >> a[0];
	for (int i = 1; i < 7; i++) {
		cin >> a[i];
		if (a[i - 1] == a[i])count++;
		else {
			count = 0;
			p++;
		}

		if (count == 4) {
			cout << "NO" << endl;
			return 0;
		}
	}
	if (p > 3) {
		cout << "YES" << endl;
	}
	return 0;
}
0