結果
| 問題 | No.396 クラス替え |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2016-07-16 19:31:17 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 1,000 ms |
| コード長 | 588 bytes |
| コンパイル時間 | 1,537 ms |
| コンパイル使用メモリ | 166,612 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-11-17 11:09:39 |
| 合計ジャッジ時間 | 2,264 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 20 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i,n) for(int (i)=0;(i)<(int)(n);++(i))
#define each(itr,c) for(__typeof(c.begin()) itr=c.begin(); itr!=c.end(); ++itr)
#define all(x) (x).begin(),(x).end()
#define mp make_pair
#define pb push_back
#define fi first
#define se second
int n,m;
int classnum(int a)
{
--a;
int r=a%(2*m);
if(r>=m) r=2*m-1-r;
return r+1;
}
int main()
{
cin >>n >>m;
int x,y;
cin >>x >>y;
string ans="NO";
if(classnum(x)==classnum(y)) ans="YES";
cout << ans << endl;
return 0;
}