結果

問題 No.396 クラス替え
ユーザー Daigo HIROOKA
提出日時 2018-05-29 01:19:35
言語 Java
(openjdk 23)
結果
AC  
実行時間 133 ms / 1,000 ms
コード長 333 bytes
コンパイル時間 3,130 ms
コンパイル使用メモリ 74,576 KB
実行使用メモリ 54,388 KB
最終ジャッジ日時 2024-06-30 07:58:09
合計ジャッジ時間 6,551 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 20
権限があれば一括ダウンロードができます

ソースコード

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