結果
| 問題 | No.396 クラス替え |
| コンテスト | |
| ユーザー |
taba
|
| 提出日時 | 2017-05-19 05:07:41 |
| 言語 | C++11 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 1,000 ms |
| コード長 | 451 bytes |
| 記録 | |
| コンパイル時間 | 1,120 ms |
| コンパイル使用メモリ | 132,896 KB |
| 実行使用メモリ | 7,972 KB |
| 最終ジャッジ日時 | 2026-04-06 23:17:24 |
| 合計ジャッジ時間 | 1,535 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 20 |
ソースコード
#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");
return 0;
}
taba