結果
| 問題 | 
                            No.360 増加門松列
                             | 
                    
| コンテスト | |
| ユーザー | 
                             | 
                    
| 提出日時 | 2016-04-17 23:03:35 | 
| 言語 | Java  (openjdk 23)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 545 bytes | 
| コンパイル時間 | 1,917 ms | 
| コンパイル使用メモリ | 74,896 KB | 
| 実行使用メモリ | 56,172 KB | 
| 最終ジャッジ日時 | 2024-10-04 10:47:51 | 
| 合計ジャッジ時間 | 5,410 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge5 / judge1 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 9 WA * 13 | 
ソースコード
import java.util.Arrays;
import java.util.Scanner;
public class Main{
	public static void main(String[] args)throws Exception{
		new Main().solve();
	}
	void solve(){
		Scanner sc=new Scanner(System.in);
		int[] d=new int[7];
		for(int i=0;i<7;i++){
			d[i]=sc.nextInt();
		}
		Arrays.sort(d);
		int count=1;
		int countM=1;
		for(int i=0;i<6;i++){
			if(d[i]==d[i+1]){
				count++;
				countM=Math.max(countM, count);
			}else{
				count=0;
			}
		}
		if(countM>=5){
			System.out.println("NO");
		}else{
			System.out.println("YES");
		}
	}
}