結果

問題 No.1298 OR XOR
ユーザー anil beraanil bera
提出日時 2020-11-27 22:37:22
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 1,118 bytes
コンパイル時間 1,612 ms
コンパイル使用メモリ 164,876 KB
実行使用メモリ 4,508 KB
最終ジャッジ日時 2023-10-09 20:40:33
合計ジャッジ時間 3,934 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 AC 1 ms
4,380 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#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;
			}
		}
	}
}



//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();
	}
}
0