結果

問題 No.384 マス埋めゲーム2
ユーザー vjudge1
提出日時 2025-05-17 17:59:31
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 1,000 ms
コード長 290 bytes
コンパイル時間 659 ms
コンパイル使用メモリ 61,000 KB
実行使用メモリ 7,848 KB
最終ジャッジ日時 2025-05-17 17:59:32
合計ジャッジ時間 1,587 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 22
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<iostream>
using namespace std;
int main()
{
	//freopen("game.in","r",stdin);
	//freopen("game.out","w",stdout);
		long long h,w,n,k;
		cin>>h>>w>>n>>k;
		int a=h-1+w;
		int ans=a%n;
		if(ans==k||ans==0&&k==n){
			cout<<"YES"<<endl;
		}
		else{
			cout<<"NO"<<endl;
		}
	return 0;
}
0