結果
問題 | No.1366 交換門松列・梅 |
ユーザー |
|
提出日時 | 2021-01-29 21:47:26 |
言語 | Java (openjdk 23) |
結果 |
WA
|
実行時間 | - |
コード長 | 4,173 bytes |
コンパイル時間 | 2,457 ms |
コンパイル使用メモリ | 77,748 KB |
実行使用メモリ | 37,160 KB |
最終ジャッジ日時 | 2024-06-27 08:01:28 |
合計ジャッジ時間 | 3,403 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 7 WA * 4 |
ソースコード
/* 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 lengthint 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 */