結果

問題 No.166 マス埋めゲーム
ユーザー Shawn stayCShawn stayC
提出日時 2020-07-02 22:32:13
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 313 bytes
コンパイル時間 1,536 ms
コンパイル使用メモリ 166,716 KB
実行使用メモリ 814,328 KB
最終ジャッジ日時 2023-10-13 10:14:42
合計ジャッジ時間 4,086 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,348 KB
testcase_01 AC 2 ms
4,352 KB
testcase_02 AC 2 ms
4,348 KB
testcase_03 WA -
testcase_04 AC 2 ms
4,348 KB
testcase_05 WA -
testcase_06 AC 2 ms
4,372 KB
testcase_07 RE -
testcase_08 AC 2 ms
4,352 KB
testcase_09 RE -
testcase_10 RE -
testcase_11 MLE -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0; i<(n); i++)
typedef long long ll;

int main(){
	ll h,w,n,k;
	cin>>h>>w>>n>>k;
	vector<int> v(h*w);
	int j=1;
	for(int i=0; i<h*w; i++){
		v[i]=j;
		if(j>k) j=1;
		else j++;
	}
	if(v[h*w-1]==k) cout<<"YES"<<endl;
	else cout<<"NO"<<endl;
}
0