結果
問題 | No.1298 OR XOR |
ユーザー |
![]() |
提出日時 | 2020-11-27 22:04:04 |
言語 | C++17(clang) (17.0.6 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 259 bytes |
コンパイル時間 | 1,665 ms |
コンパイル使用メモリ | 124,288 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-07-26 12:51:28 |
合計ジャッジ時間 | 2,545 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 13 |
ソースコード
#include <cmath>#include <iostream>using namespace std;int main() {int n;cin >> n;int a, b, c;a = n;b = n & (1 << int(log2(n)));c = n - b;if (c == 0) {a = b = c = -1;}cout << a << ' ' << b << ' ' << c << endl;return 0;}