結果

問題 No.396 クラス替え
ユーザー 37zigen
提出日時 2016-07-15 22:47:06
言語 Java
(openjdk 23)
結果
WA  
実行時間 -
コード長 482 bytes
コンパイル時間 1,953 ms
コンパイル使用メモリ 74,232 KB
実行使用メモリ 41,432 KB
最終ジャッジ日時 2024-10-15 04:36:38
合計ジャッジ時間 5,102 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 17 WA * 3
権限があれば一括ダウンロードができます

ソースコード

diff #

package No300台;

import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		solver();
	}

	static void solver() {
		Scanner sc = new Scanner(System.in);
		long n = sc.nextLong();
		long m = sc.nextLong();
		long x = sc.nextLong();
		long y = sc.nextLong();
		x = x % (2 * m);
		y = y % (2 * m);
		if(x==y){
			System.out.println("YES");
		}else if(Math.abs(x+y)==2*m+1){
			System.out.println("YES");
		}else{
			System.out.println("NO");
		}
	}
}
0