Submission #2530756


Source Code Expand

import java.io.IOException;
import java.io.InputStream;
import java.util.NoSuchElementException;

public class Main {
	public static void main(String[] args) {
		FastScanner sc = new FastScanner();
		String str1 = sc.next();
		String str2 = sc.next();
		
		if(str1.charAt(0) == str2.charAt(2) && str1.charAt(1) == str2.charAt(1) && str1.charAt(2) == str2.charAt(0))
			System.out.println("Yes");
		else
			System.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;
	}

	private void skipUnprintable() {
		while (hasNextByte() && !isPrintableChar(buffer[ptr]))
			ptr++;
	}

	public boolean hasNext() {
		skipUnprintable();
		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());
	}

}

Submission Info

Submission Time
Task A - Rotation
User mochimochi
Language Java8 (OpenJDK 1.8.0)
Score 0
Code Size 2329 Byte
Status WA
Exec Time 70 ms
Memory 22484 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 0 / 100
Status
WA × 3
WA × 13
Set Name Test Cases
Sample s1.txt, s2.txt, s3.txt
All 01.txt, 02.txt, 03.txt, 04.txt, 05.txt, 06.txt, 07.txt, 08.txt, 09.txt, 10.txt, s1.txt, s2.txt, s3.txt
Case Name Status Exec Time Memory
01.txt WA 69 ms 19028 KB
02.txt WA 69 ms 20180 KB
03.txt WA 69 ms 18516 KB
04.txt WA 67 ms 21588 KB
05.txt WA 68 ms 19156 KB
06.txt WA 68 ms 18772 KB
07.txt WA 69 ms 18772 KB
08.txt WA 70 ms 21076 KB
09.txt WA 70 ms 18772 KB
10.txt WA 69 ms 19796 KB
s1.txt WA 69 ms 22484 KB
s2.txt WA 69 ms 18132 KB
s3.txt WA 67 ms 21204 KB