結果

問題 No.1298 OR XOR
ユーザー yansi819yansi819
提出日時 2024-03-23 17:40:32
言語 C++17(gcc12)
(gcc 12.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 341 bytes
コンパイル時間 4,403 ms
コンパイル使用メモリ 261,252 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-09-30 13:32:55
合計ジャッジ時間 5,310 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 13
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
#include <atcoder/all>
using namespace std;
using namespace atcoder;
using ll = long long;
using ld = long double;

int N;

int main() {
  cin >> N;
  if (N == (N & -N)) {
    cout << "-1 -1 -1" << endl;
    return 0;
  }
  int A = N, B = N & -N, C = N ^ B;
  cout << A << " " << B << " " << C << endl;
  return 0;
}
0