結果
| 問題 | No.396 クラス替え |
| コンテスト | |
| ユーザー |
tossy
|
| 提出日時 | 2016-07-15 22:33:07 |
| 言語 | C++14 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 1,000 ms |
| コード長 | 721 bytes |
| 記録 | |
| コンパイル時間 | 750 ms |
| コンパイル使用メモリ | 102,700 KB |
| 実行使用メモリ | 7,972 KB |
| 最終ジャッジ日時 | 2026-05-12 08:31:43 |
| 合計ジャッジ時間 | 2,164 ms |
|
ジャッジサーバーID (参考情報) |
tmp-judge_1 / judge3_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 20 |
ソースコード
#include <cstdio>
#include <cstring>
#include <string>
#include <cmath>
#include <cassert>
#include <iostream>
#include <algorithm>
#include <stack>
#include <queue>
#include <vector>
#include <set>
#include <map>
#include <bitset>
using namespace std;
#define repl(i,a,b) for(int i=(int)(a);i<(int)(b);i++)
#define rep(i,n) repl(i,0,n)
#define mp(a,b) make_pair(a,b)
#define pb(a) push_back(a)
#define all(x) (x).begin(),(x).end()
#define dbg(x) cout<<#x"="<<x<<endl
#define INF 1<<30
int n,m;
int cl(int i){
i = (i-1)%(2*m)+1;
if(i<=m) return i;
else return 2*m-i+1;
}
int main(){
int x,y;
cin>>n>>m>>x>>y;
if(cl(x) == cl(y)) cout<<"YES"<<endl;
else cout<<"NO"<<endl;
return 0;
}
tossy