結果
問題 | No.1298 OR XOR |
ユーザー | てりやき |
提出日時 | 2020-11-27 21:32:28 |
言語 | C++14 (gcc 12.3.0 + boost 1.83.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 788 bytes |
コンパイル時間 | 1,476 ms |
コンパイル使用メモリ | 163,944 KB |
実行使用メモリ | 4,380 KB |
最終ジャッジ日時 | 2023-10-01 04:55:04 |
合計ジャッジ時間 | 2,238 ms |
ジャッジサーバーID (参考情報) |
judge14 / judge15 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 1 ms
4,376 KB |
testcase_01 | AC | 1 ms
4,380 KB |
testcase_02 | AC | 1 ms
4,380 KB |
testcase_03 | AC | 0 ms
4,380 KB |
testcase_04 | AC | 2 ms
4,376 KB |
testcase_05 | AC | 1 ms
4,380 KB |
testcase_06 | AC | 2 ms
4,380 KB |
testcase_07 | AC | 1 ms
4,376 KB |
testcase_08 | AC | 2 ms
4,380 KB |
testcase_09 | AC | 1 ms
4,376 KB |
testcase_10 | AC | 1 ms
4,380 KB |
testcase_11 | AC | 1 ms
4,380 KB |
testcase_12 | AC | 1 ms
4,376 KB |
testcase_13 | AC | 2 ms
4,376 KB |
ソースコード
#include <bits/stdc++.h> //#include <atcoder/modint.hpp> using namespace std; #define all(a)a.begin(),a.end() using ll=long long; const int INF = 1<<30; const ll INFll =1LL<<62; //const int mod= int(1e9)+7; //const int mod2=998244353; using P = pair<int,int>; using Pl= pair<ll,ll>; using ld=long double; using V=vector<int>; using Vl=vector<ll>; using Vd=vector<ld>; using VV=vector<vector<int>>; using VVl=vector<vector<ll>>; using VVd=vector<vector<ld>>; //using mint=atcoder::modint1000000007; int main() { ios::sync_with_stdio(false); cin.tie(nullptr); int n;cin >>n; int x=__builtin_popcount(n); if(x==1){ cout <<-1<<" "<<-1<<" "<<-1<<"\n"; return 0; } else{ cout <<n<<" "<<(n&(-n))<<" "<<n-(n&-n)<<"\n"; } return 0; }