結果

問題 No.2253 Ignore Subtle Differences
ユーザー ks2mks2m
提出日時 2023-03-24 21:43:09
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 1,015 bytes
コンパイル時間 3,730 ms
コンパイル使用メモリ 77,820 KB
実行使用メモリ 56,260 KB
最終ジャッジ日時 2023-10-18 20:54:51
合計ジャッジ時間 4,901 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

public class Main {
	public static void main(String[] args) throws Exception {
		long smax = 0;
		long ma = 0, mb = 0, mc = 0, md = 0;
		for (int a = 1; a <= 100; a++) {
			for (int b = 1; b <= 100; b++) {
				for (int c = 1; c <= 100; c++) {
					for (int d = 1; d <= 100; d++) {
						int x2 = a * a + b * b;
						int y2 = c * c + d * d;
						int z2 = (a - c) * (a - c) + (b - d) * (b - d);
						int max = Math.max(Math.max(x2, y2), z2);
						int min = Math.min(Math.min(x2, y2), z2);
						if (min + 1 == max) {
							int s = a * d - b * c;
							s = Math.abs(s) / 2;
							if (s > smax) {
								smax = s;
								ma = a;
								mb = b;
								mc = c;
								md = d;
							}
						}
					}
				}
			}
		}
//		System.out.println(smax);
		ma *= 10000000;
		mb *= 10000000;
		mc *= 10000000;
		md *= 10000000;
		long ss = ma * md - mb * mc;
		ss = Math.abs(ss) / 2;
		System.out.println("0 0");
		System.out.println(ma + " " + mb);
		System.out.println(mc + " " + md);
//		System.out.println(ss);
	}
}
0