結果
| 問題 | 
                            No.360 増加門松列
                             | 
                    
| コンテスト | |
| ユーザー | 
                             mako55go
                         | 
                    
| 提出日時 | 2016-04-18 00:05:30 | 
| 言語 | C++11(廃止可能性あり)  (gcc 13.3.0)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 412 bytes | 
| コンパイル時間 | 469 ms | 
| コンパイル使用メモリ | 60,608 KB | 
| 実行使用メモリ | 6,824 KB | 
| 最終ジャッジ日時 | 2024-10-04 11:13:49 | 
| 合計ジャッジ時間 | 1,305 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge3 / judge1 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 10 WA * 12 | 
ソースコード
#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 == 3) {
			cout << "NO" << endl;
			return 0;
		}
	}
	if (p > 3) {
		cout << "YES" << endl;
	}
	return 0;
}
            
            
            
        
            
mako55go