結果
| 問題 | No.1298 OR XOR |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-11-30 12:33:44 |
| 言語 | C++14 (gcc 15.3.0 + boost 1.92.0) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 2,000 ms |
| + 519µs | |
| コード長 | 385 bytes |
| 記録 | |
| コンパイル時間 | 318 ms |
| コンパイル使用メモリ | 76,416 KB |
| 実行使用メモリ | 6,272 KB |
| 最終ジャッジ日時 | 2026-08-25 20:39:15 |
| 合計ジャッジ時間 | 1,608 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 13 |
ソースコード
#include <iostream>
#include <vector>
#include <string>
using namespace std;
int lsb(int x){
return x & (~(x-1));
}
int main()
{
int n;
cin >> n;
int x = lsb(n);
int a = n, b = n, c = x;
b = b & (~c);
if(a == 0 || b == 0 || c == 0 ){
cout << "-1 -1 -1 "<<endl;
}else{
cout << a << " "<< b << " "<< c <<endl;
}
return 0;
}