結果

問題 No.3088 XOR = SUM
ユーザー applejam
提出日時 2025-04-04 22:23:14
言語 C++23
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 1,158 bytes
コンパイル時間 3,662 ms
コンパイル使用メモリ 173,440 KB
実行使用メモリ 7,720 KB
最終ジャッジ日時 2025-04-04 22:23:45
合計ジャッジ時間 16,754 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 1 WA * 21
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <vector>
#include <algorithm>
#include <bitset>
#include <atcoder/all>
using namespace std;
using namespace atcoder;
using ll = long long;
using mint = modint998244353;
using vi = vector<int>;
using vvi = vector<vi>;
using vvvi = vector<vvi>;
using vll = vector<ll>;
using vvll = vector<vll>;
using vvvll = vector<vvll>;
using vmi = vector<mint>;
using vvmi = vector<vmi>;
using vvvmi = vector<vvmi>;
#define all(a) (a).begin(), (a).end()
#define rep2(i, m, n) for (int i = (m); i < (n); ++i)
#define rep(i, n) rep2(i, 0, n)
#define drep2(i, m, n) for (int i = (m)-1; i >= (n); --i)
#define drep(i, n) drep2(i, n, 0)

int main(){
    ios::sync_with_stdio(false);
    std::cin.tie(nullptr);
    int t; cin >> t;
    while(t--){
        ll n; cin >> n;
        bitset<64> bs(n);
        bitset<64> x, y;
        bool f = true;
        drep(i, 64){
            if(bs[i]){
                if(f){
                    x.set(i);
                }else{
                    y.set(i);
                }
                f = false;
            }
        }
        cout << x.to_ullong() << " " << y.to_ullong() << endl;
    }

    return 0;
}
0