結果
| 問題 |
No.396 クラス替え
|
| ユーザー |
|
| 提出日時 | 2020-06-18 01:13:04 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 338 bytes |
| コンパイル時間 | 1,902 ms |
| コンパイル使用メモリ | 192,580 KB |
| 最終ジャッジ日時 | 2025-01-11 05:03:47 |
|
ジャッジサーバーID (参考情報) |
judge3 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 17 WA * 3 |
ソースコード
#include<bits/stdc++.h>
using namespace std;
int solve(int n,int m,int xy){
int a=(xy+m-1)/m,b=xy%m;
int ret;
if(a&1){
if(b==0)ret=m;
else ret=b;
}
else{
ret=m+1-b;
}
return ret;
}
int main(){
cin.tie(0),ios::sync_with_stdio(false);
int n,m,x,y; cin>>n>>m>>x>>y;
cout<<(solve(n,m,x)==solve(n,m,y)?"YES"s:"NO"s)<<"\n"s;
}