結果

問題 No.384 マス埋めゲーム2
ユーザー 👑 obakyan
提出日時 2019-03-31 22:30:35
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 2 ms / 1,000 ms
コード長 412 bytes
コンパイル時間 548 ms
コンパイル使用メモリ 71,612 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-11-22 13:17:33
合計ジャッジ時間 1,385 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 22
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <cstdio>
#include <cstdlib>
#include <cstddef>
#include <vector>
#include <algorithm>
#include <cmath>
#include <string>
#include <iostream>
#include <iomanip>

int main(void)
{
	long h, w, n, k;
	std::cin >> h >> w >> n >> k;
    if((h + w - 1) % n == k % n){//h+w=5: 4ninme 2nara 2ninme
        std::cout << "YES" << std::endl;
    } else {
        std::cout << "NO" << std::endl;
    }
	return 0;
}

0