結果
問題 |
No.1298 OR XOR
|
ユーザー |
![]() |
提出日時 | 2020-11-27 21:28:09 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 520 bytes |
コンパイル時間 | 1,577 ms |
コンパイル使用メモリ | 166,200 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-07-23 22:05:05 |
合計ジャッジ時間 | 3,068 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 6 WA * 7 |
ソースコード
#include <bits/stdc++.h> using namespace std; using ll = long long; #define rep(i, srt, end) for (long long i = (srt); i < (long long)(end); i++) void solve() { ll n; cin >> n; bool f = true; rep(i, 0, 40) { if((1LL<<i) > n) break; if(!((1LL<<i) & n)) f = false; } if(!f || n == 1) cout << "-1 -1 -1\n"; else { cout << n << " " << 1 << " " << n-1 << "\n"; } } int main() { ios::sync_with_stdio(false); cin.tie(nullptr); solve(); return 0; }