結果
| 問題 |
No.396 クラス替え
|
| コンテスト | |
| ユーザー |
taba
|
| 提出日時 | 2017-05-19 05:00:22 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 597 bytes |
| コンパイル時間 | 1,436 ms |
| コンパイル使用メモリ | 128,816 KB |
| 最終ジャッジ日時 | 2025-01-05 00:23:47 |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 17 WA * 3 |
ソースコード
#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;
}
taba