結果
| 問題 | No.1298 OR XOR | 
| コンテスト | |
| ユーザー |  | 
| 提出日時 | 2020-12-07 15:18:14 | 
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 2 ms / 2,000 ms | 
| コード長 | 491 bytes | 
| コンパイル時間 | 2,046 ms | 
| コンパイル使用メモリ | 192,116 KB | 
| 最終ジャッジ日時 | 2025-01-16 18:57:48 | 
| ジャッジサーバーID (参考情報) | judge5 / judge6 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 1 | 
| other | AC * 13 | 
ソースコード
// #pragma GCC optimize("Ofast")
// #pragma GCC optimize("unroll-loops")
// #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
int main(){
    cin.tie(nullptr);
    ios::sync_with_stdio(false);
    int n; cin >> n;
    if(__builtin_popcount(n)<=1){
        cout << -1 << " " << -1 << " " << -1 << "\n";
    }
    else{
        cout << n << " " << (n&-n) << " " << ((n&-n)^n) << "\n";
    }
}
            
            
            
        