結果

問題 No.384 マス埋めゲーム2
ユーザー btk
提出日時 2016-07-02 00:20:44
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 323 bytes
コンパイル時間 1,940 ms
コンパイル使用メモリ 165,444 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-10-12 01:37:39
合計ジャッジ時間 2,488 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 10 WA * 12
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<bits/stdc++.h>

using namespace std;

struct INIT{
    INIT(){
	ios::sync_with_stdio(false);
	cin.tie(0);
    }
}init;

int main(){
    long long R,C,N,K;
    cin>>R>>C>>N>>K;
    if(R==1||C==1)
	cout<<(((R*C+N-1)%N+1==K)?"YES":"NO")<<endl;
    else
	cout<<(((R*C+N+N-2)%N+1==K)?"YES":"NO")<<endl;
    return 0;
}
0