結果
| 問題 |
No.1298 OR XOR
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-11-28 06:50:41 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 463 bytes |
| コンパイル時間 | 1,487 ms |
| コンパイル使用メモリ | 166,976 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-09-12 22:02:52 |
| 合計ジャッジ時間 | 2,639 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 9 WA * 4 |
ソースコード
#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,b,c=n;
if(n%2==0){
a=2;
b=n-2;
}else {
a=1;
b=n-1;
}
ll ans=a^b^c;
ll ans2=a|b;
ll ans3=b|c;
ll ans4=c|a;
if(ans!=0||b==0){
cout<<"-1 -1 -1"<<endl;
return 0;
}
cout<<a<<" "<<b<<" "<<c<<endl;
//cout<<ans<<" "<<ans2<<" "<<ans3<<" "<<ans4<<endl;
return 0;
}