結果
問題 |
No.1298 OR XOR
|
ユーザー |
|
提出日時 | 2020-11-27 21:25:06 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 737 bytes |
コンパイル時間 | 1,642 ms |
コンパイル使用メモリ | 166,276 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-07-23 21:56:39 |
合計ジャッジ時間 | 2,266 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 13 |
ソースコード
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef unsigned long long ull; typedef pair<int,int> iint; typedef pair<ll,ll> llll; #define ALL(x) (x).begin(),(x).end() const ll zero = 0; const ll one = 1; const ll INF = 9223372036854775807; //10^18 const int inINF = 2147483647; //10^9 const ll MOD = 1000000007; //10^9+7 const ll MOD2 = 998244353; void Yes() {printf("Yes\n");} void No() {printf("No\n");} void YES() {printf("YES\n");} void NO() {printf("NO\n");} int main(){ ll N; cin >> N; if(__builtin_popcount(N) == 1){ printf("%d %d %d\n", -1, -1, -1); } else{ ll a = N; ll b = N & (-N); ll c = N - b; printf("%lld %lld %lld\n", a, b, c); } }