結果

問題 No.384 マス埋めゲーム2
ユーザー Naoyk1212Naoyk1212
提出日時 2016-07-01 23:09:55
言語 C++11
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 474 bytes
コンパイル時間 1,049 ms
コンパイル使用メモリ 159,328 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-04-20 06:05:13
合計ジャッジ時間 1,698 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
6,816 KB
testcase_01 WA -
testcase_02 AC 1 ms
6,940 KB
testcase_03 AC 1 ms
6,944 KB
testcase_04 AC 1 ms
6,944 KB
testcase_05 WA -
testcase_06 AC 1 ms
6,940 KB
testcase_07 AC 1 ms
6,940 KB
testcase_08 WA -
testcase_09 AC 1 ms
6,944 KB
testcase_10 AC 1 ms
6,940 KB
testcase_11 AC 2 ms
6,940 KB
testcase_12 WA -
testcase_13 WA -
testcase_14 AC 1 ms
6,944 KB
testcase_15 AC 1 ms
6,944 KB
testcase_16 AC 1 ms
6,944 KB
testcase_17 AC 1 ms
6,944 KB
testcase_18 AC 1 ms
6,940 KB
testcase_19 AC 1 ms
6,940 KB
testcase_20 WA -
testcase_21 AC 1 ms
6,944 KB
testcase_22 WA -
testcase_23 AC 1 ms
6,940 KB
testcase_24 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<bits/stdc++.h>
using namespace std;

int main(){
  long long h, w, n, k;
  cin >> h >> w >> n >> k;

  if(w == h){
    if(w % n == k){
      cout << "NO" << endl;
    }else if(w % n == 0 && n == k){
      cout << "NO" << endl;
    }else{
      cout << "YES" << endl;
    }
  }else{
    if((w + h - 2) % n == k){
      cout << "NO" << endl;
    }else if((w + h - 2) % n == 0 && n == k){
      cout << "NO" << endl;
    }else{
      cout << "YES" << endl;
    }
  }
}
0