Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package jsdfff;
- import java.util.Arrays;
- import java.util.Scanner;
- public class Aihdsfs {
- public static void main(String[] args) {
- Scanner in = new Scanner (System.in);
- int n;
- n = in.nextInt();
- in.nextLine();
- String casas, placar;
- String[] p = new String[2];
- String[] s = new String[2];
- int[] x = new int[2];
- String[] y = new String[n];
- String[] z = new String[n];
- for (int i=0; i<n; i++) {
- casas = in.nextLine();
- p = casas.split("x");
- y[i] = p[0];
- z[i] = p[1];
- }
- for (int i=0; i<n; i++) {
- placar = in.nextLine();
- s = placar.split("-");
- x[0] = Integer.parseInt(s[0]);
- x[1] = Integer.parseInt(s[1]);
- if (x[0] > x[1]) {
- System.out.println(y[i]);
- } else if (x[1] > x[0]) {
- System.out.println(z[i]);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement