結果

問題 No.1366 交換門松列・梅
ユーザー Balaram GhoshBalaram Ghosh
提出日時 2021-01-29 21:41:05
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 4,118 bytes
コンパイル時間 2,253 ms
コンパイル使用メモリ 77,640 KB
実行使用メモリ 37,128 KB
最終ジャッジ日時 2024-06-27 07:52:30
合計ジャッジ時間 3,376 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 50 ms
37,036 KB
testcase_01 AC 49 ms
36,788 KB
testcase_02 AC 50 ms
36,836 KB
testcase_03 AC 52 ms
36,872 KB
testcase_04 WA -
testcase_05 AC 50 ms
36,708 KB
testcase_06 AC 49 ms
36,664 KB
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 AC 50 ms
36,580 KB
testcase_11 AC 50 ms
36,784 KB
testcase_12 AC 51 ms
36,996 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

/* Code by Balaram Ghosh */
 
import java.io.DataInputStream; 
import java.io.FileInputStream; 
import java.io.IOException; 
import java.io.InputStreamReader; 
import java.util.Scanner; 
import java.util.StringTokenizer; 
import java.io.*;
import java.util.*;
import java.lang.*;

class A1366 
{ 

   public static void main(String[] args) throws IOException {
        Reader s=new Reader(); 
        int[] a=new int[3];
        int[] b=new int[3];
        for (int i = 0; i < 3; i++) {
            a[i]=s.nextInt();
        }
        for (int i = 0; i < 3; i++) {
            b[i]=s.nextInt();
        }
        Arrays.sort(a);
        Arrays.sort(b);
        boolean bool=false;
        for (int i = 0; i < 3; i++) {
            if(a[i]!=b[i]) bool=true;
        }
        System.out.println(bool==true? "Yes" : "No");
    } 
    static class Reader 
    { 
        final private int BUFFER_SIZE = 1 << 16; 
        private DataInputStream din; 
        private byte[] buffer; 
        private int bufferPointer, bytesRead; 

        public Reader() 
        { 
            din = new DataInputStream(System.in); 
            buffer = new byte[BUFFER_SIZE]; 
            bufferPointer = bytesRead = 0; 
        } 

        public Reader(String file_name) throws IOException 
        { 
            din = new DataInputStream(new FileInputStream(file_name)); 
            buffer = new byte[BUFFER_SIZE]; 
            bufferPointer = bytesRead = 0; 
        } 

        public String readLine() throws IOException 
        { 
            byte[] buf = new byte[64]; // line length 
            int cnt = 0, c; 
            while ((c = read()) != -1) 
            { 
                if (c == '\n') 
                    break; 
                buf[cnt++] = (byte) c; 
            } 
            return new String(buf, 0, cnt); 
        } 

        public int nextInt() throws IOException 
        { 
            int ret = 0; 
            byte c = read(); 
            while (c <= ' ') 
                c = read(); 
            boolean neg = (c == '-'); 
            if (neg) 
                c = read(); 
            do
            { 
                ret = ret * 10 + c - '0'; 
            } while ((c = read()) >= '0' && c <= '9'); 

            if (neg) 
                return -ret; 
            return ret; 
        } 

        public long nextLong() throws IOException 
        { 
            long ret = 0; 
            byte c = read(); 
            while (c <= ' ') 
                c = read(); 
            boolean neg = (c == '-'); 
            if (neg) 
                c = read(); 
            do { 
                ret = ret * 10 + c - '0'; 
            } 
            while ((c = read()) >= '0' && c <= '9'); 
            if (neg) 
                return -ret; 
            return ret; 
        } 

        public double nextDouble() throws IOException 
        { 
            double ret = 0, div = 1; 
            byte c = read(); 
            while (c <= ' ') 
                c = read(); 
            boolean neg = (c == '-'); 
            if (neg) 
                c = read(); 

            do { 
                ret = ret * 10 + c - '0'; 
            } 
            while ((c = read()) >= '0' && c <= '9'); 

            if (c == '.') 
            { 
                while ((c = read()) >= '0' && c <= '9') 
                { 
                    ret += (c - '0') / (div *= 10); 
                } 
            } 

            if (neg) 
                return -ret; 
            return ret; 
        } 

        private void fillBuffer() throws IOException 
        { 
            bytesRead = din.read(buffer, bufferPointer = 0, BUFFER_SIZE); 
            if (bytesRead == -1) 
                buffer[0] = -1; 
        } 

        private byte read() throws IOException 
        { 
            if (bufferPointer == bytesRead) 
                fillBuffer(); 
            return buffer[bufferPointer++]; 
        } 

        public void close() throws IOException 
        { 
            if (din == null) 
                return; 
            din.close(); 
        } 
    } 
} 

/* Code by Balaram Ghosh */

0