結果

問題 No.396 クラス替え
ユーザー ぴろずぴろず
提出日時 2016-07-15 22:32:13
言語 Java19
(openjdk 21)
結果
AC  
実行時間 123 ms / 1,000 ms
コード長 380 bytes
コンパイル時間 1,870 ms
コンパイル使用メモリ 71,332 KB
実行使用メモリ 56,496 KB
最終ジャッジ日時 2023-08-10 23:50:55
合計ジャッジ時間 5,246 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 119 ms
55,720 KB
testcase_01 AC 119 ms
55,988 KB
testcase_02 AC 119 ms
55,492 KB
testcase_03 AC 117 ms
55,824 KB
testcase_04 AC 115 ms
56,380 KB
testcase_05 AC 116 ms
56,464 KB
testcase_06 AC 118 ms
56,496 KB
testcase_07 AC 120 ms
55,692 KB
testcase_08 AC 120 ms
56,284 KB
testcase_09 AC 121 ms
55,552 KB
testcase_10 AC 120 ms
55,796 KB
testcase_11 AC 121 ms
56,396 KB
testcase_12 AC 119 ms
55,688 KB
testcase_13 AC 116 ms
55,884 KB
testcase_14 AC 120 ms
56,100 KB
testcase_15 AC 120 ms
55,964 KB
testcase_16 AC 116 ms
55,952 KB
testcase_17 AC 123 ms
55,748 KB
testcase_18 AC 120 ms
55,692 KB
testcase_19 AC 116 ms
56,220 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

package no396;

import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int m = sc.nextInt();
		int x = sc.nextInt();
		int y = sc.nextInt();
		int p1 = (x - 1) % (m * 2);
		int p2 = (y - 1) % (m * 2);
		System.out.println((p1 == p2 || p1 + p2 == m * 2 - 1) ? "YES" : "NO");
	}

}
0