結果

問題 No.166 マス埋めゲーム
ユーザー test
提出日時 2020-09-16 17:36:22
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 339 bytes
コンパイル時間 1,685 ms
コンパイル使用メモリ 192,864 KB
最終ジャッジ日時 2025-01-14 15:15:34
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 13 WA * 7
権限があれば一括ダウンロードができます

ソースコード

diff #

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

int H, W, N, K;
void input() { cin >> H >> W >> N >> K; }

void solve() {
  string ans = "YES";
  int chk = H * W % N;
  if (chk == 0) chk = N;
  if (chk != K) ans = "NO";
  cout << ans << endl;
}

int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  input();
  solve();
  getchar();
}
0