結果
| 問題 | No.384 マス埋めゲーム2 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2016-07-01 23:33:38 |
| 言語 | Java (openjdk 25.0.2) |
| 結果 |
AC
|
| 実行時間 | 52 ms / 1,000 ms |
| コード長 | 582 bytes |
| 記録 | |
| コンパイル時間 | 2,457 ms |
| コンパイル使用メモリ | 82,464 KB |
| 実行使用メモリ | 41,552 KB |
| 最終ジャッジ日時 | 2026-04-28 12:03:47 |
| 合計ジャッジ時間 | 5,362 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge2_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 22 |
ソースコード
import java.io.*;
import java.util.*;
public class Main_yukicoder384 {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
Printer pr = new Printer(System.out);
int h = sc.nextInt();
int w = sc.nextInt();
long n = sc.nextLong();
long k = sc.nextLong();
if ((h - 1 + w - 1) % n == k - 1) {
pr.println("YES");
} else {
pr.println("NO");
}
pr.close();
sc.close();
}
private static class Printer extends PrintWriter {
Printer(PrintStream out) {
super(out);
}
}
}