結果

問題 No.396 クラス替え
ユーザー 37zigen37zigen
提出日時 2016-07-15 22:47:06
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 482 bytes
コンパイル時間 2,106 ms
コンパイル使用メモリ 75,124 KB
実行使用メモリ 43,484 KB
最終ジャッジ日時 2024-04-23 04:58:11
合計ジャッジ時間 5,585 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 135 ms
41,956 KB
testcase_01 AC 117 ms
40,276 KB
testcase_02 AC 135 ms
41,560 KB
testcase_03 AC 131 ms
41,228 KB
testcase_04 AC 133 ms
41,824 KB
testcase_05 AC 135 ms
43,484 KB
testcase_06 AC 133 ms
41,488 KB
testcase_07 WA -
testcase_08 AC 133 ms
41,584 KB
testcase_09 WA -
testcase_10 AC 129 ms
41,480 KB
testcase_11 AC 131 ms
41,436 KB
testcase_12 AC 126 ms
41,456 KB
testcase_13 AC 135 ms
41,000 KB
testcase_14 AC 133 ms
41,824 KB
testcase_15 AC 124 ms
40,536 KB
testcase_16 AC 134 ms
41,308 KB
testcase_17 AC 123 ms
41,600 KB
testcase_18 WA -
testcase_19 AC 135 ms
41,692 KB
権限があれば一括ダウンロードができます

ソースコード

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