結果
| 問題 |
No.396 クラス替え
|
| コンテスト | |
| ユーザー |
vjudge1
|
| 提出日時 | 2025-05-16 15:23:28 |
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 760 bytes |
| コンパイル時間 | 3,371 ms |
| コンパイル使用メモリ | 272,904 KB |
| 実行使用メモリ | 7,844 KB |
| 最終ジャッジ日時 | 2025-05-16 15:23:33 |
| 合計ジャッジ時間 | 3,763 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 17 WA * 3 |
ソースコード
#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 n,m,x,y,u,v,w,res,ans,arr[maxn];
signed main()
{
cin>>n>>m>>x>>y;
u=(x+m-1)/m,v=(y+m-1)/m;
if(u&1)
{
res=x%m;
if(!res)
{
res=m;
}
}
else
{
res=m-(x%m-1);
}
if(v&1)
{
ans=y%m;
if(!ans)
{
ans=m;
}
}
else
{
ans=m-(y%m-1);
}
if(res==ans)
{
cout<<"YES";
}
else
{
cout<<"NO";
}
return 0;
}
vjudge1