結果

問題 No.166 マス埋めゲーム
ユーザー yukiteru
提出日時 2018-02-05 17:30:10
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 1,000 ms
コード長 688 bytes
コンパイル時間 727 ms
コンパイル使用メモリ 81,416 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-07-08 06:13:41
合計ジャッジ時間 1,321 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 20
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<iostream>
#include<string>
#include<string.h>
#include<algorithm>
#include<stdio.h>
#include<cmath>
#include<vector>
#include<utility>
#include<stack>
#include<queue>
#include<list>
#include<bitset>
#include<functional>

#define FOR(i, a, b) for(int i=(a);i<=(b);i++)
#define RFOR(i, a, b) for(int i=(a);i>=(b);i--)
#define MOD 1000000007
#define INF 1000000000
#define PI 3.14159265358979

using namespace std;
typedef pair<int, int> P;

int main(void) {
	long long int h, w, n, k;
	long long int p;

	cin >> h >> w >> n >> k;

	if ((h*w)%n == 0) {
		p = n;
	}
	else {
		p = (h*w)%n;
	}
	if (p == k) {
		cout << "YES" << endl;
	}
	else {
		cout << "NO" << endl;
	}

	return 0;
}
0