結果

問題 No.1829 Möbius Tunnelling
ユーザー ks2m
提出日時 2022-02-04 22:13:05
言語 Java
(openjdk 23)
結果
AC  
実行時間 127 ms / 2,000 ms
コード長 500 bytes
コンパイル時間 2,668 ms
コンパイル使用メモリ 74,340 KB
実行使用メモリ 41,588 KB
最終ジャッジ日時 2024-06-11 11:57:45
合計ジャッジ時間 6,445 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 24
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {
	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int a = sc.nextInt();
		int b = sc.nextInt();
		int c = sc.nextInt() + n;
		sc.close();

		if (a < b) {
			if (n * 2L + a - c < n) {
				System.out.println("Yes");
			} else {
				System.out.println("No");
			}
		} else {
			if (c - a < n) {
				System.out.println("Yes");
			} else {
				System.out.println("No");
			}
		}
	}
}
0