結果

問題 No.396 クラス替え
ユーザー Daigo HIROOKADaigo HIROOKA
提出日時 2018-05-29 01:19:35
言語 Java21
(openjdk 21)
結果
AC  
実行時間 123 ms / 1,000 ms
コード長 333 bytes
コンパイル時間 3,926 ms
コンパイル使用メモリ 71,452 KB
実行使用メモリ 56,420 KB
最終ジャッジ日時 2023-09-12 20:20:28
合計ジャッジ時間 7,571 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 116 ms
55,548 KB
testcase_01 AC 119 ms
55,504 KB
testcase_02 AC 120 ms
55,660 KB
testcase_03 AC 121 ms
55,984 KB
testcase_04 AC 122 ms
55,920 KB
testcase_05 AC 120 ms
55,464 KB
testcase_06 AC 118 ms
55,692 KB
testcase_07 AC 121 ms
56,420 KB
testcase_08 AC 123 ms
56,148 KB
testcase_09 AC 121 ms
55,776 KB
testcase_10 AC 120 ms
53,636 KB
testcase_11 AC 121 ms
55,976 KB
testcase_12 AC 122 ms
55,656 KB
testcase_13 AC 119 ms
55,968 KB
testcase_14 AC 123 ms
55,800 KB
testcase_15 AC 123 ms
55,728 KB
testcase_16 AC 120 ms
55,932 KB
testcase_17 AC 120 ms
55,708 KB
testcase_18 AC 122 ms
55,632 KB
testcase_19 AC 122 ms
55,660 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class No396{
	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();

		if(X%(2*M) == Y%(2*M) || (X+Y)%(2*M) == 1){
			System.out.println("YES");
		}else System.out.println("NO");
	}
}
0