Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class Main {
- public static void main(String[] args) {
- Scanner scanner = new Scanner(System.in);
- String number = scanner.nextLine();
- Integer N = Integer.parseInt(number);
- for (int i = 0; i < N; i++) {
- String[] arr2 = scanner.nextLine().split(" ");
- boolean isSymetric = true;
- for(int j = 0; j < arr2.length / 2; j++){
- if (!arr2[j].equals(arr2[arr2.length -1 - j ]) ) {
- isSymetric =false;
- break;
- }
- }
- if(isSymetric){
- System.out.println("Yes");
- }else{
- System.out.println("No");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment