結果

問題 No.360 増加門松列
コンテスト
ユーザー 37zigen
提出日時 2016-04-17 23:03:35
言語 Java
(openjdk 27 + ACL)
コンパイル:
javac -J-Duser.language=en -encoding UTF8 -cp /opt/aclib/ac_library.jar _filename_
実行:
java -ea -Xmx700m -Xss256M -DONLINE_JUDGE=true -cp .:/opt/aclib/ac_library.jar _class_
結果
WA  
実行時間 -
コード長 545 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 4,032 ms
コンパイル使用メモリ 85,672 KB
実行使用メモリ 43,468 KB
最終ジャッジ日時 2026-09-10 03:23:50
合計ジャッジ時間 6,774 ms
ジャッジサーバーID
(参考情報)
judge2_0 / judge3_1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 9 WA * 13
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

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");
		}
	}
}
0