結果

問題 No.384 マス埋めゲーム2
ユーザー tntan
提出日時 2016-07-05 23:48:19
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 2 ms / 1,000 ms
コード長 343 bytes
コンパイル時間 1,286 ms
コンパイル使用メモリ 157,528 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-10-12 20:24:34
合計ジャッジ時間 2,180 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 22
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef pair<int, int> pii;
#define pb push_back
#define mp make_pair
#define fi first
#define se second

int main()
{
	ll h,w,n,k;
	cin>>h>>w>>n>>k;
	ll p=((h-1)+(w-1)+1)%n;
	if(!p)p=n;
	if(k==p)cout<<"YES"<<endl;
	else cout<<"NO"<<endl;
	return 0;
}
0