結果

問題 No.384 マス埋めゲーム2
ユーザー okayunonaha
提出日時 2016-07-01 22:55:03
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
TLE  
実行時間 -
コード長 424 bytes
コンパイル時間 572 ms
コンパイル使用メモリ 54,188 KB
実行使用メモリ 13,636 KB
最終ジャッジ日時 2024-10-12 00:56:08
合計ジャッジ時間 2,885 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample -- * 3
other AC * 1 TLE * 1 -- * 20
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
using namespace std;

int main (void) {
    int H, W, N, K, ans = 0;
    cin.tie(0);
    ios::sync_with_stdio(false);
    cin >> H >> W >> N >> K;

    while (1) {
        if (!H || !W) break;

        if (H >= W) {
            H--;
        } else {
            W--;
        }
        ans++;
        if (ans > K) ans = 1;
    }
    if (ans == K) cout << "YES\n";
    else cout << "NO\n";

    return 0;
}
0