結果

問題 No.384 マス埋めゲーム2
ユーザー vjudge1
提出日時 2025-05-16 15:16:59
言語 C++23
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 598 bytes
コンパイル時間 2,637 ms
コンパイル使用メモリ 274,540 KB
実行使用メモリ 7,848 KB
最終ジャッジ日時 2025-05-16 15:17:03
合計ジャッジ時間 3,899 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample WA * 3
other WA * 22
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:14:12: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   14 |     freopen("game.in","r",stdin);
      |     ~~~~~~~^~~~~~~~~~~~~~~~~~~~~
main.cpp:15:12: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   15 |     freopen("game.out","w",stdout);
      |     ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~

ソースコード

diff #

#include<bits/stdc++.h>
//if atcoder
//#pragma GCC optimize(3)
#define FastIO ios::sync_with_stdio(0);cin.tie(0);cout.tie(0)
#define int long long
#define I using
#define AK namespace
#define CSPS2025 std
I AK CSPS2025;
const int maxn=1e6+10,maxm=1e3+10,mod=998244353;
int t,n,m,x,y,u,v,w,arr[maxn];
signed main()
{
    freopen("game.in","r",stdin);
    freopen("game.out","w",stdout);
    cin>>t;
    while(t--)
    {
        cin>>n>>m>>x>>y;
        if((n+m-2)%x+1==y)
        {
            cout<<"YES\n";
        }
        else
        {
            cout<<"NO\n";
        }
    }
    return 0;
}
0