結果

問題 No.690 E869120 and Constructing Array 4
ユーザー Pachicobue
提出日時 2018-09-15 04:11:11
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 40 ms / 1,000 ms
コード長 547 bytes
コンパイル時間 1,894 ms
コンパイル使用メモリ 194,172 KB
最終ジャッジ日時 2025-01-06 13:24:40
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 19
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
#define show(x) std::cerr << #x << " = " << x << std::endl
using ll = long long;
int main()
{
    int K;
    std::cin >> K;
    if (K == 0) { return std::cout << "2 0" << std::endl, 0; }
    std::cout << 32 << " " << 465 + __builtin_popcount(K) << std::endl;
    for (int i = 1; i <= 31; i++) {
        for (int j = i + 1; j <= 31; j++) { std::cout << i << " " << j << std::endl; }
    }
    for (int i = 0; i <= 29; i++) {
        if (K & (1 << i)) { std::cout << i + 2 << " " << 32 << std::endl; }
    }
    return 0;
}
0