結果

問題 No.1366 交換門松列・梅
ユーザー Balaram GhoshBalaram Ghosh
提出日時 2021-01-29 21:43:22
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 4,137 bytes
コンパイル時間 2,259 ms
コンパイル使用メモリ 74,680 KB
実行使用メモリ 49,508 KB
最終ジャッジ日時 2023-09-09 15:04:40
合計ジャッジ時間 4,014 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 43 ms
49,304 KB
testcase_01 AC 41 ms
49,296 KB
testcase_02 AC 44 ms
49,188 KB
testcase_03 AC 42 ms
49,016 KB
testcase_04 WA -
testcase_05 AC 42 ms
49,096 KB
testcase_06 AC 43 ms
49,316 KB
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 AC 43 ms
49,260 KB
testcase_11 AC 42 ms
49,108 KB
testcase_12 AC 44 ms
49,172 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;
            break;
        }
        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