@@ -0,0 +1,776 @@
+// https://codeforces.com/problemset/problem/572/A%0A%0Aimport java.util.Scanner;%0A%0Apublic class Solution %7B%0A%0A%09public static void main(String%5B%5D args) %7B%0A%09%09Scanner read = new Scanner(System.in);%0A%09%09%0A%09%09int nA = read.nextInt();%0A%09%09int nB = read.nextInt();%0A%09%09int k = read.nextInt();%0A%09%09int m = read.nextInt();%0A%09%09%0A%09%09int%5B%5D a = new int%5BnA%5D;%0A%09%09for (int i = 0; i %3C nA; ++i) %7B%0A%09%09%09a%5Bi%5D = read.nextInt();%0A%09%09%7D%0A%09%09%0A%09%09int%5B%5D b = new int%5BnB%5D;%0A%09%09for (int i = 0; i %3C nB; ++i) %7B%0A%09%09%09b%5Bi%5D = read.nextInt();%0A%09%09%7D%0A%09%09%0A%09%09boolean possible = true;%0A%09%09for (int i = nB-1, j = 0; %0A%09%09%09 j %3C m; %0A%09%09%09 --i, ++j) %0A%09%09%7B%0A%09%09%09if (b%5Bi%5D %3C= a%5Bk-1%5D) %7B%0A%09%09%09%09possible = false;%0A%09%09%09%09break;%0A%09%09%09%7D%0A%09%09%7D%0A%09%09%0A%09%09if (possible) %7B%0A%09%09%09System.out.println(%22YES%22);%0A%09%09%7D%0A%09%09else %7B%0A%09%09%09System.out.println(%22NO%22);%0A%09%09%7D%0A%09%09%0A%09%09// Close scanner%0A%09%09read.close();%0A%09%7D%0A%0A%7D%0A

Create Arrays.java