結果
問題 | No.1107 三善アクセント |
ユーザー | naveenverma1 |
提出日時 | 2020-07-10 21:41:17 |
言語 | Java21 (openjdk 21) |
結果 |
WA
|
実行時間 | - |
コード長 | 7,977 bytes |
コンパイル時間 | 3,880 ms |
コンパイル使用メモリ | 84,664 KB |
実行使用メモリ | 37,104 KB |
最終ジャッジ日時 | 2024-10-11 08:29:27 |
合計ジャッジ時間 | 4,996 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 52 ms
36,788 KB |
testcase_01 | AC | 52 ms
37,072 KB |
testcase_02 | AC | 52 ms
36,992 KB |
testcase_03 | AC | 52 ms
36,660 KB |
testcase_04 | AC | 52 ms
36,912 KB |
testcase_05 | AC | 52 ms
36,740 KB |
testcase_06 | AC | 52 ms
36,992 KB |
testcase_07 | AC | 52 ms
36,752 KB |
testcase_08 | AC | 52 ms
36,768 KB |
testcase_09 | AC | 54 ms
37,088 KB |
testcase_10 | WA | - |
testcase_11 | AC | 52 ms
36,492 KB |
testcase_12 | AC | 53 ms
37,104 KB |
testcase_13 | AC | 52 ms
36,880 KB |
testcase_14 | AC | 51 ms
36,948 KB |
testcase_15 | AC | 52 ms
36,724 KB |
testcase_16 | WA | - |
testcase_17 | AC | 53 ms
36,716 KB |
testcase_18 | AC | 53 ms
36,944 KB |
testcase_19 | AC | 52 ms
36,948 KB |
testcase_20 | AC | 52 ms
36,500 KB |
testcase_21 | AC | 52 ms
36,992 KB |
testcase_22 | AC | 53 ms
37,068 KB |
testcase_23 | AC | 53 ms
37,052 KB |
testcase_24 | AC | 53 ms
36,916 KB |
testcase_25 | AC | 52 ms
36,520 KB |
testcase_26 | WA | - |
ソースコード
import java.text.DecimalFormat; import java.util.stream.LongStream; import java.util.stream.IntStream; import java.io.*; import java.util.*; public class Main { public static void main(String[] args) { FastScanner sc = new FastScanner(); PrintWriter out = new PrintWriter(System.out); //int t = sc.nextInt(); // while(t-->0){ Naveen problem = new Naveen(sc); problem.solve(out); // } out.flush(); } } class Naveen { int a,b,c,d; //int[] arr; Naveen(FastScanner sc) { a = sc.nextInt(); b = sc.nextInt(); c = sc.nextInt(); d = sc.nextInt(); // arr = sc.arrayInt(n); } void solve(PrintWriter out) { // int m = My.max(a,b,c,d); // int s = My.smax(a,b,c,d); // if((m==c||m==b)&&(s==c||s==b)&&(a!=b)&&(a!=c)&&(d!=b)&&(d!=c)){ // System.out.println("YES"); // }else{ // out.println("NO"); // } if(a<c&&a<b&&d<b&&d<c&&a<=9&&b<=9&&c<=9&&d<=9&&a>=1&&b>=1&&c>=1&&d>=1) out.println("YES"); else out.println("NO"); } } class FastScanner { private final InputStream in = System.in; private final byte[] buffer = new byte[1024]; private int ptr = 0; private int buflen = 0; private boolean hasNextByte() { if (ptr < buflen) { return true; } else { ptr = 0; try { buflen = in.read(buffer); } catch (IOException e) { e.printStackTrace(); } if (buflen <= 0) { return false; } } return true; } private int readByte() { if (hasNextByte()) { return buffer[ptr++]; } else { return -1; } } private static boolean isPrintableChar(int c) { return 33 <= c && c <= 126; } public boolean hasNext() { while (hasNextByte() && !isPrintableChar(buffer[ptr])) { ptr++; } return hasNextByte(); } public String next() { if (!hasNext()) { throw new NoSuchElementException(); } StringBuilder sb = new StringBuilder(); int b = readByte(); while (isPrintableChar(b)) { sb.appendCodePoint(b); b = readByte(); } return sb.toString(); } public long nextLong() { if (!hasNext()) { throw new NoSuchElementException(); } long n = 0; boolean minus = false; int b = readByte(); if (b == '-') { minus = true; b = readByte(); } if (b < '0' || '9' < b) { throw new NumberFormatException(); } while (true) { if ('0' <= b && b <= '9') { n *= 10; n += b - '0'; } else if (b == -1 || !isPrintableChar(b)) { return minus ? -n : n; } else { throw new NumberFormatException(); } b = readByte(); } } public int nextInt() { long nl = nextLong(); if (nl < Integer.MIN_VALUE || nl > Integer.MAX_VALUE) { throw new NumberFormatException(); } return (int) nl; } public double nextDouble() { return Double.parseDouble(next()); } public int[] arrayInt(int N) { int[] array = new int[N]; for (int i = 0; i < N; i++) { array[i] = nextInt(); } return array; } public long[] arrayLong(int N) { long[] array = new long[N]; for (int i = 0; i < N; i++) { array[i] = nextLong(); } return array; } public double[] arrayDouble(int N) { double[] array = new double[N]; for (int i = 0; i < N; i++) { array[i] = nextDouble(); } return array; } public String[] arrayString(int N) { String[] array = new String[N]; for (int i = 0; i < N; i++) { array[i] = next(); } return array; } public int randomInt() { Random r = new Random(); int value = r.nextInt((int) 1e6); System.out.println(value); return value; } public int[] randomInt(int N) { int[] array = new int[N]; Random r = new Random(); for (int i = 0; i < N; i++) { array[i] = r.nextInt((int) 1e6); } System.out.println(Arrays.toString(array)); return array; } } class My { public static long lower(long arr[],long key){ int low = 0; int high = arr.length-1; while(low < high){ int mid = low + (high - low)/2; if(arr[mid] >= key){ high = mid; } else{ low = mid+1; } } return low; } public static int upper(int arr[],int key){ int low = 0; int high = arr.length-1; while(low < high){ int mid = low + (high - low+1)/2; if(arr[mid] <= key){ low = mid; } else{ high = mid-1; } } return low; } static void ans(boolean b) { System.out.println(b ? "Yes" : "No"); } static void ANS(boolean b) { System.out.println(b ? "YES" : "NO"); } static String sort(String s) { char[] ch = s.toCharArray(); Arrays.sort(ch); return String.valueOf(ch); } static String reverse(String s) { return new StringBuilder(s).reverse().toString(); } static int[] reverse(int[] array) { for (int i = 0; i < array.length / 2; i++) { int temp = array[i]; array[i] = array[array.length - 1 - i]; array[array.length - 1 - i] = temp; } return array; } static long[] reverse(long[] array) { for (int i = 0; i < array.length / 2; i++) { long temp = array[i]; array[i] = array[array.length - 1 - i]; array[array.length - 1 - i] = temp; } return array; } static double[] reverse(double[] array) { for (int i = 0; i < array.length / 2; i++) { double temp = array[i]; array[i] = array[array.length - 1 - i]; array[array.length - 1 - i] = temp; } return array; } static String[] reverse(String[] array) { for (int i = 0; i < array.length / 2; i++) { String temp = array[i]; array[i] = array[array.length - 1 - i]; array[array.length - 1 - i] = temp; } return array; } static char[] reverse(char[] array) { for (int i = 0; i < array.length / 2; i++) { char temp = array[i]; array[i] = array[array.length - 1 - i]; array[array.length - 1 - i] = temp; } return array; } static long min(long... numbers) { Arrays.sort(numbers); return numbers[0]; } static int min(int... numbers) { Arrays.sort(numbers); return numbers[0]; } static double min(double... numbers) { Arrays.sort(numbers); return numbers[0]; } static long max(long... numbers) { Arrays.sort(numbers); return numbers[numbers.length - 1]; } static int max(int... numbers) { Arrays.sort(numbers); return numbers[numbers.length - 1]; } static int smax(int... numbers) { Arrays.sort(numbers); return numbers[numbers.length - 2]; } static double max(double... numbers) { Arrays.sort(numbers); return numbers[numbers.length - 1]; } static int sum(long number) { int sum = 0; while (number > 0) { sum += number % 10; number /= 10; } return sum; } }