結果
| 問題 | No.396 クラス替え |
| コンテスト | |
| ユーザー |
newlife171128
|
| 提出日時 | 2018-01-17 00:29:32 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 1,000 ms |
| コード長 | 684 bytes |
| コンパイル時間 | 708 ms |
| コンパイル使用メモリ | 81,444 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-12-24 05:57:19 |
| 合計ジャッジ時間 | 1,656 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 20 |
ソースコード
#include <iostream>
#include <iomanip>
#include <vector>
#include <algorithm>
#include <string>
#include <sstream>
#include <cmath>
#include <stack>
#include <queue>
#include <cctype>
#include <stdio.h>
#include <map>
#include <string.h>
#include <utility>
typedef long long ll;
using namespace std;
int main() {
long n=0 ,m=0;
cin>>n>>m;
int x=0, y=0;
cin>>x>>y;
int miss_x=0;
if(((x-1)/m) %2 ==0){
miss_x = (x-1)%m;
}else {
int tmp = (x-1)%m;
miss_x = m-1-tmp;
}
int mr_y=0;
if(((y-1)/m) %2 ==0){
mr_y = (y-1)%m;
}else {
int tmp = (y-1)%m;
mr_y = m-1-tmp;
}
if(mr_y == miss_x){
cout<<"YES"<<endl;
}else {
cout<<"NO"<<endl;
}
return 0;
}
newlife171128