結果
問題 | No.1298 OR XOR |
ユーザー | iqueue02 |
提出日時 | 2020-12-19 17:19:17 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 348 bytes |
コンパイル時間 | 1,808 ms |
コンパイル使用メモリ | 191,500 KB |
最終ジャッジ日時 | 2025-01-17 03:54:53 |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 13 |
ソースコード
#include <bits/stdc++.h> using namespace std; #define rep(i,n) for(int i = 0; i < (n); i++) typedef long long ll; typedef long double ld; typedef pair<int,int> P; int main() { int n; cin >> n; if (__builtin_popcount(n) == 1) cout << "-1 -1 -1" << endl; else cout << n << " " << (n & (-n)) << " "<< (n ^ (n & (-n))) << endl; return 0; }