結果

問題 No.384 マス埋めゲーム2
ユーザー vjudge1
提出日時 2025-05-20 21:26:44
言語 C++23
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 1,000 ms
コード長 556 bytes
コンパイル時間 3,171 ms
コンパイル使用メモリ 273,224 KB
実行使用メモリ 7,844 KB
最終ジャッジ日時 2025-05-20 21:27:02
合計ジャッジ時間 3,580 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 22
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
#define int long long
//#define USE_FREOPEN
//#define MUL_TEST
#define FILENAME "game"
using namespace std;

void solve() {
	int h, w, n, k;
	cin >> h >> w >> n >> k;
	if ((k % n) == ((h + w - 1) % n)) cout << "YES\n";
	else cout << "NO\n";
}

signed main() {
	ios::sync_with_stdio(false);
	cin.tie(nullptr); cout.tie(nullptr);

	#ifdef USE_FREOPEN
		freopen(FILENAME ".in","r",stdin);
		freopen(FILENAME ".out","w",stdout);
	#endif
	int _ = 1;
	#ifdef MUL_TEST
		cin >> _;
	#endif
	while (_--)
		solve();
	_^=_;
	return 0^_^0;
}

0