結果

問題 No.396 クラス替え
ユーザー tabataba
提出日時 2017-05-19 05:00:22
言語 C++17
(gcc 13.2.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 597 bytes
コンパイル時間 1,266 ms
コンパイル使用メモリ 133,764 KB
実行使用メモリ 4,348 KB
最終ジャッジ日時 2023-10-19 01:47:12
合計ジャッジ時間 2,153 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,348 KB
testcase_01 AC 2 ms
4,348 KB
testcase_02 AC 1 ms
4,348 KB
testcase_03 AC 2 ms
4,348 KB
testcase_04 AC 2 ms
4,348 KB
testcase_05 AC 2 ms
4,348 KB
testcase_06 AC 2 ms
4,348 KB
testcase_07 WA -
testcase_08 AC 2 ms
4,348 KB
testcase_09 WA -
testcase_10 AC 2 ms
4,348 KB
testcase_11 AC 1 ms
4,348 KB
testcase_12 AC 2 ms
4,348 KB
testcase_13 AC 2 ms
4,348 KB
testcase_14 AC 2 ms
4,348 KB
testcase_15 AC 1 ms
4,348 KB
testcase_16 AC 2 ms
4,348 KB
testcase_17 AC 2 ms
4,348 KB
testcase_18 WA -
testcase_19 AC 2 ms
4,348 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <cstdio>
#include <cstring>
#include <cmath>
#include <cassert>
#include <random>
#include <vector>
#include <algorithm>
#include <array>
#include <functional>
#include <utility>
#include <regex>
#include <tuple>
#include <map>

using namespace std;

int main(){
	int64_t n,m,x,y;
	-scanf("%ld%ld%ld%ld",&n,&m,&x,&y);
	//x--;y--;
	x=x%(m*2);
	if(x>m){
		x=m*2-x+1;
	}
	y=y%(m*2);
	if(y>m){
		y=m*2-y+1;
	}
	puts(x==y?"YES":"NO");
	//printf("%ld,%ld\n",x,y);
	/*
	vector<int> c(m*2);
	for(int i=0;i<m;i++){
		c[i]=c[m*2-i-1]=i;
	}
	puts(c[x%(m*2)]==c[y%(m*2)]?"YES":"NO");
	*/
	return 0;
}
0