【洛谷OJ】【JAVA】P1056 排座椅

https://www.luogu.org/problemnew/show/P1056

import java.util.Arrays;
import java.util.Map.Entry;
import java.util.Scanner;
import java.util.TreeMap;

public class Main {
	private static Scanner cin;
	private static int m;
	private static int n;
	private static int k;
	private static int l;
	private static int d;
	public static void main(String args[]) throws Exception {
		cin = new Scanner(System.in);
		String t = cin.nextLine();
		String[] v = t.split(" ");
		m = Integer.valueOf(v[0]);
		n = Integer.valueOf(v[1]);
		k = Integer.valueOf(v[2]);
		l = Integer.valueOf(v[3]);
		d = Integer.valueOf(v[4]);
		
		int x,y,p,q;
		TreeMap tmK = new TreeMap<>();
		TreeMap tmL = new TreeMap<>();
		for(int i=0;i e;
		int[] karray = new int[k];
		int[] larray = new int[l];
		for(int i=0,size=tmK.size();i

 

你可能感兴趣的:(JAVA,OJ)