結果
| 問題 |
No.396 クラス替え
|
| コンテスト | |
| ユーザー |
vjudge1
|
| 提出日時 | 2025-05-16 15:18:32 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 1,000 ms |
| コード長 | 449 bytes |
| コンパイル時間 | 1,292 ms |
| コンパイル使用メモリ | 161,320 KB |
| 実行使用メモリ | 7,844 KB |
| 最終ジャッジ日時 | 2025-05-16 15:18:34 |
| 合計ジャッジ時間 | 2,334 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 20 |
ソースコード
#include<bits/stdc++.h>
#define int long long
#define fr first
#define sc second
using namespace std;
int const N=1e6+5;
typedef pair<int,int> pii;
int n, m, x, y;
signed main() {
ios::sync_with_stdio(0);
cin.tie(0), cout.tie(0);
cin >> n >> m >> x >> y;
int p = 2 * m;
int nx = x % p;
if (nx == 0) nx = p;
int ny = y % p;
if (ny == 0) ny = p;
if (nx == ny || nx + ny == p + 1) {
cout << "YES";
} else {
cout << "NO";
}
return 0;
}
vjudge1