結果

問題 No.730 アルファベットパネル
ユーザー GrenacheGrenache
提出日時 2018-09-16 18:47:12
言語 Java21
(openjdk 21)
結果
AC  
実行時間 120 ms / 2,000 ms
コード長 768 bytes
コンパイル時間 3,791 ms
コンパイル使用メモリ 73,016 KB
実行使用メモリ 56,128 KB
最終ジャッジ日時 2023-09-25 09:05:54
合計ジャッジ時間 5,763 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 117 ms
55,928 KB
testcase_01 AC 120 ms
55,672 KB
testcase_02 AC 118 ms
56,128 KB
testcase_03 AC 116 ms
55,660 KB
testcase_04 AC 117 ms
55,968 KB
testcase_05 AC 118 ms
55,940 KB
testcase_06 AC 116 ms
55,900 KB
testcase_07 AC 118 ms
55,792 KB
testcase_08 AC 120 ms
55,464 KB
testcase_09 AC 120 ms
55,608 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.*;
import java.util.*;


public class Main_yukicoder730 {

	private static Scanner sc;
	private static Printer pr;

	private static void solve() {
		char[] s = sc.next().toCharArray();

		int[] cnt = new int[26];
		for (char c : s) {
			if (cnt[c - 'A']++ > 0) {
				pr.println("NO");
				return;
			}
		}

		pr.println("YES");
	}

	// ---------------------------------------------------
	public static void main(String[] args) {
		sc = new Scanner(INPUT == null ? System.in : new ByteArrayInputStream(INPUT.getBytes()));
		pr = new Printer(System.out);

		solve();

//		pr.close();
		pr.flush();
//		sc.close();
	}

	static String INPUT = null;

	private static class Printer extends PrintWriter {
		Printer(OutputStream out) {
			super(out);
		}
	}
}
0