結果
| 問題 |
No.1298 OR XOR
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-11-27 22:38:42 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 1,129 bytes |
| コンパイル時間 | 1,681 ms |
| コンパイル使用メモリ | 167,988 KB |
| 実行使用メモリ | 6,948 KB |
| 最終ジャッジ日時 | 2024-07-26 18:59:21 |
| 合計ジャッジ時間 | 3,374 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 1 |
| other | AC * 5 WA * 8 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
#define ll unsigned long long
#define vi vector<int>
#define pii pair<ll,ll>
#define piii pair<pii, ll>
#define pb push_back
#define fs first
#define sc second
#define ppb pop_back
//#define ONLINE_JUDGE
//#define endl "\n"
#define pow2(i) (1<<(i))
#define d0(x) cout<<x<<" "
#define d1(x) cout<<(x)<<endl
#define d2(x,y) cout<<(x)<<" "<<(y)<<endl
#define d3(x,y,z) cout<<x<<" "<<y<<" "<<z<<endl
#define d4(x,y,z,w) cout<<x<<" "<<y<<" "<<z<<" "<<w<<endl
#define d5(x,y,z,w,s) cout<<x<<" "<<y<<" "<<z<<" "<<w<<" "<<s<<endl
#define fifo ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
const int mod = 1000000;
const ll Inf = 9e18;
void solve()
{
ll N;
cin>>N;
ll mlt = 1;
for(int i=0;i<40;i++)
{
if(N&mlt)
{
if(N==mlt)
{
cout<<"-1 -1 -1"<<endl;return;
}
else
{
d3(mlt,mlt,N-mlt);return;
}
}
mlt*=2;
}
}
//4620347250 55500 95506 110461 146024
int main()
{
#ifndef ONLINE_JUDGE
freopen("input.txt", "r", stdin);
//freopen("output.txt", "w", stdout);
#endif
fifo
ll t=1;
//cin>>t;
for(ll tc=1;tc<=t;++tc)
{
solve();
}
}