結果

問題 No.1298 OR XOR
ユーザー IlagIlag
提出日時 2020-11-27 21:28:48
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 611 bytes
コンパイル時間 1,535 ms
コンパイル使用メモリ 163,712 KB
実行使用メモリ 4,500 KB
最終ジャッジ日時 2023-10-01 04:44:12
合計ジャッジ時間 3,956 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,376 KB
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 AC 2 ms
4,376 KB
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>

using i32 = std::int32_t;
using i64 = std::int64_t;
using u32 = std::uint32_t;
using u64 = std::uint64_t;
using usize = std::size_t;

const i32 INF = 1001001001;
const i64 LINF = 1001001001001001;
const u32 MOD1 = 1000000007;
const u32 MOD2 = 998244353;

int main(){
    std::ios::sync_with_stdio(false);
    std::cin.tie(nullptr);

    i64 n;
    std::cin>>n;
    i64 a=0,b=0,c=0;
    for(i32 i=1,j=0;i<n;i<<=1,j++){
        if(j&1){
            a|=i;
            b|=i;
        }else{
            b|=i;
            c|=i;
        }
    }

    std::cout<<a<<' '<<b<<' '<<c<<std::endl;
}
0