結果

問題 No.166 マス埋めゲーム
ユーザー naimonon77
提出日時 2015-09-27 13:17:30
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 2 ms / 1,000 ms
コード長 569 bytes
コンパイル時間 511 ms
コンパイル使用メモリ 66,064 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-07-19 10:48:22
合計ジャッジ時間 1,122 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 20
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <vector>
#include <string>
#include <cstring>
#include <algorithm>
#include <sstream>
#include <map>
#include <set>
using namespace std;


#define REP(i,a,b) for(i=a;i<b;i++)
#define rep(i,n) REP(i,0,n)

typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
/* ここからが本編 */
int main(void)
{
   int i,j;
   ull h,w;
   ull n,k;
   bool yes = 0;
   cin >> h >> w >> n >> k;
   if(n == k) k = 0;
   if((h * w) % n == k) yes = 1;
   if(yes) cout << "YES" << endl;
   else cout << "NO" << endl;
   return 0;
}
0