結果
| 問題 |
No.396 クラス替え
|
| コンテスト | |
| ユーザー |
tossy
|
| 提出日時 | 2016-07-15 22:33:07 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 1,000 ms |
| コード長 | 721 bytes |
| コンパイル時間 | 698 ms |
| コンパイル使用メモリ | 83,352 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-11-17 10:43:47 |
| 合計ジャッジ時間 | 1,370 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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