結果

問題 No.396 クラス替え
ユーザー 👑 CleyL
提出日時 2019-06-03 15:08:15
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 302 bytes
コンパイル時間 483 ms
コンパイル使用メモリ 54,144 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-09-17 20:25:01
合計ジャッジ時間 1,200 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other WA * 20
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
using namespace std;
int main(){
  int n,m,x,y;cin>>n>>m>>x>>y;
  int xc = (((x-1)%(m*2) < m) ? (x-1)%m : m-((x-1)%m-1));
  int yc = (((y-1)%(m*2) < m) ? (y-1)%m : m-((y-1)%m-1));
  cout << xc << " " << yc << endl;
  if(xc == yc)cout << "YES" << endl;
  else cout << "NO" << endl;
}
0