結果
| 問題 |
No.1298 OR XOR
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-11-28 06:48:40 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 480 bytes |
| コンパイル時間 | 1,690 ms |
| コンパイル使用メモリ | 167,768 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-09-12 22:02:45 |
| 合計ジャッジ時間 | 3,087 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 1 |
| other | AC * 5 WA * 8 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define rep(i, n) for (ll i = 0; i < (ll)(n); i++)
int main()
{
ll n;
cin>>n;
ll a=n,b=n,c=0;
rep(i,31){
if((b>>i)&1){
b^=(1LL<<i);
c^=(1LL<<i);
break;
}
}
if(b==0){
cout<<"-1 -1 -1"<<endl;
return 0;
}
ll ans=a^b^c;
ll ans2=a|b;
ll ans3=b|c;
ll ans4=c|a;
//cout<<a<<" "<<b<<" "<<c<<endl;
//cout<<ans<<" "<<ans2<<" "<<ans3<<" "<<ans4<<endl;
return 0;
}